gnzlbg / cargo-asm

cargo subcommand showing the assembly or llvm-ir generated for Rust code
https://github.com/gnzlbg/cargo-asm
Other
1.17k stars 36 forks source link

Refactored target information into TargetInfo struct #118

Closed therealprof closed 5 years ago

therealprof commented 5 years ago

Instead of manually comparing information from the triplets there's a TargetInfo structure which is passed along with a number of methods allowing to easily reason about the target without having to deal with triplets all over the map. Instead of creating TargetInfo from scratch all over the map it's passed along all the way from main so it's much easier to test the code or implement funny stuff in the future. This makes access to target() superfluous and thus it's private now. No optimisation has been done to the accessor methods yet, just the previous code moved here.

Signed-off-by: Daniel Egger daniel@eggers-club.de

gnzlbg commented 5 years ago

Needs rebasing

therealprof commented 5 years ago

Done.