[llvm] [SPARC][IAS] Emit the correct 32-bit ELF machine type (PR #96583)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 06:40:34 PDT 2024
================
@@ -132,14 +132,18 @@ namespace {
class SparcAsmBackend : public MCAsmBackend {
protected:
const Target &TheTarget;
+ const MCSubtargetInfo &TheSTI;
bool Is64Bit;
+ bool HasV9;
public:
- SparcAsmBackend(const Target &T)
+ SparcAsmBackend(const Target &T, const MCSubtargetInfo &STI)
: MCAsmBackend(StringRef(T.getName()) == "sparcel"
? llvm::endianness::little
: llvm::endianness::big),
- TheTarget(T), Is64Bit(StringRef(TheTarget.getName()) == "sparcv9") {}
+ TheTarget(T), TheSTI(STI),
+ Is64Bit(StringRef(TheTarget.getName()) == "sparcv9"),
----------------
koachan wrote:
> Now you have STI, you can just get the triple and avoid ugly string comparisons for all these (isArch64Bit and isLittleEndian)
Whoops, I missed this comment, but fixed too, thanks!
https://github.com/llvm/llvm-project/pull/96583
More information about the llvm-commits
mailing list