diff options
Diffstat (limited to 'llvm/lib/Target/X86/X86AsmBackend.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86AsmBackend.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86AsmBackend.cpp b/llvm/lib/Target/X86/X86AsmBackend.cpp index 1d66b841523..754a2009790 100644 --- a/llvm/lib/Target/X86/X86AsmBackend.cpp +++ b/llvm/lib/Target/X86/X86AsmBackend.cpp @@ -13,6 +13,7 @@ #include "llvm/MC/MCAssembler.h" #include "llvm/MC/MCSectionELF.h" #include "llvm/MC/MCSectionMachO.h" +#include "llvm/MC/MachObjectWriter.h" #include "llvm/Target/TargetRegistry.h" #include "llvm/Target/TargetAsmBackend.h" using namespace llvm; @@ -57,6 +58,10 @@ public: HasScatteredSymbols = true; } + MCObjectWriter *createObjectWriter(raw_ostream &OS) const { + return 0; + } + bool isVirtualSection(const MCSection &Section) const { const MCSectionELF &SE = static_cast<const MCSectionELF&>(Section); return SE.getType() == MCSectionELF::SHT_NOBITS;; @@ -82,6 +87,10 @@ class DarwinX86_32AsmBackend : public DarwinX86AsmBackend { public: DarwinX86_32AsmBackend(const Target &T) : DarwinX86AsmBackend(T) {} + + MCObjectWriter *createObjectWriter(raw_ostream &OS) const { + return new MachObjectWriter(OS, /*Is64Bit=*/false); + } }; class DarwinX86_64AsmBackend : public DarwinX86AsmBackend { @@ -91,6 +100,10 @@ public: HasReliableSymbolDifference = true; } + MCObjectWriter *createObjectWriter(raw_ostream &OS) const { + return new MachObjectWriter(OS, /*Is64Bit=*/true); + } + virtual bool doesSectionRequireSymbols(const MCSection &Section) const { // Temporary labels in the string literals sections require symbols. The // issue is that the x86_64 relocation format does not allow symbol + |