diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-21 17:00:36 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-21 17:00:36 +0000 |
| commit | 1ad4095d6bb6b827708c30b96183e6b15ae1578e (patch) | |
| tree | bfb7af9a2fcc813dbc26c4ad8b9690660929e70f /llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp | |
| parent | c09b854f6b9766596f1ce2b9feafb9655f20ea76 (diff) | |
| download | bcm5719-llvm-1ad4095d6bb6b827708c30b96183e6b15ae1578e.tar.gz bcm5719-llvm-1ad4095d6bb6b827708c30b96183e6b15ae1578e.zip | |
Reduce the exposure of Triple::OSType in the ELF object writer. This will
avoid including ADT/Triple.h in many places when the target specific bits are
moved.
llvm-svn: 147059
Diffstat (limited to 'llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp')
| -rw-r--r-- | llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp b/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp index d5acbe97493..c0c2106807c 100644 --- a/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp +++ b/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp @@ -41,8 +41,8 @@ static unsigned getFixupKindSize(unsigned Kind) { namespace { class MBlazeELFObjectWriter : public MCELFObjectTargetWriter { public: - MBlazeELFObjectWriter(Triple::OSType OSType) - : MCELFObjectTargetWriter(/*is64Bit*/ false, OSType, ELF::EM_MBLAZE, + MBlazeELFObjectWriter(uint8_t OSABI) + : MCELFObjectTargetWriter(/*is64Bit*/ false, OSABI, ELF::EM_MBLAZE, /*HasRelocationAddend*/ true) {} }; @@ -123,15 +123,15 @@ bool MBlazeAsmBackend::WriteNopData(uint64_t Count, MCObjectWriter *OW) const { namespace { class ELFMBlazeAsmBackend : public MBlazeAsmBackend { public: - Triple::OSType OSType; - ELFMBlazeAsmBackend(const Target &T, Triple::OSType _OSType) - : MBlazeAsmBackend(T), OSType(_OSType) { } + uint8_t OSABI; + ELFMBlazeAsmBackend(const Target &T, uint8_t _OSABI) + : MBlazeAsmBackend(T), OSABI(_OSABI) { } void ApplyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize, uint64_t Value) const; MCObjectWriter *createObjectWriter(raw_ostream &OS) const { - return createELFObjectWriter(new MBlazeELFObjectWriter(OSType), OS, + return createELFObjectWriter(new MBlazeELFObjectWriter(OSABI), OS, /*IsLittleEndian*/ false); } }; @@ -172,5 +172,6 @@ MCAsmBackend *llvm::createMBlazeAsmBackend(const Target &T, StringRef TT) { if (TheTriple.isOSWindows()) assert(0 && "Windows not supported on MBlaze"); - return new ELFMBlazeAsmBackend(T, TheTriple.getOS()); + uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TheTriple.getOS()); + return new ELFMBlazeAsmBackend(T, OSABI); } |

