diff options
author | Charles Davis <cdavis5x@gmail.com> | 2013-08-27 05:38:30 +0000 |
---|---|---|
committer | Charles Davis <cdavis5x@gmail.com> | 2013-08-27 05:38:30 +0000 |
commit | f69a29b23a116a3520f185054290c445abf9aa62 (patch) | |
tree | c98b02ef136f3b0b7378b2e883faae39c6177679 /lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp | |
parent | 45fbe98c21d06448d1977e8abc95972f4ad86b26 (diff) | |
download | external_llvm-f69a29b23a116a3520f185054290c445abf9aa62.zip external_llvm-f69a29b23a116a3520f185054290c445abf9aa62.tar.gz external_llvm-f69a29b23a116a3520f185054290c445abf9aa62.tar.bz2 |
Revert "Fix the build broken by r189315." and "Move everything depending on Object/MachOFormat.h over to Support/MachO.h."
This reverts commits r189319 and r189315. r189315 broke some tests on what I
believe are big-endian platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189321 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp')
-rw-r--r-- | lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp b/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp index 209b1d0..75b5acf 100644 --- a/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp +++ b/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp @@ -17,7 +17,7 @@ using namespace llvm; using namespace object; -using namespace MachO; +using namespace macho; namespace { class X86_64MachORelocationInfo : public MCRelocationInfo { @@ -33,7 +33,7 @@ public: StringRef SymName; SymI->getName(SymName); uint64_t SymAddr; SymI->getAddress(SymAddr); - any_relocation_info RE = Obj->getRelocation(Rel.getRawDataRefImpl()); + RelocationEntry RE = Obj->getRelocation(Rel.getRawDataRefImpl()); bool isPCRel = Obj->getAnyRelocationPCRel(RE); MCSymbol *Sym = Ctx.GetOrCreateSymbol(SymName); @@ -43,44 +43,44 @@ public: const MCExpr *Expr = 0; switch(RelType) { - case X86_64_RELOC_TLV: + case RIT_X86_64_TLV: Expr = MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_TLVP, Ctx); break; - case X86_64_RELOC_SIGNED_4: + case RIT_X86_64_Signed4: Expr = MCBinaryExpr::CreateAdd(MCSymbolRefExpr::Create(Sym, Ctx), MCConstantExpr::Create(4, Ctx), Ctx); break; - case X86_64_RELOC_SIGNED_2: + case RIT_X86_64_Signed2: Expr = MCBinaryExpr::CreateAdd(MCSymbolRefExpr::Create(Sym, Ctx), MCConstantExpr::Create(2, Ctx), Ctx); break; - case X86_64_RELOC_SIGNED_1: + case RIT_X86_64_Signed1: Expr = MCBinaryExpr::CreateAdd(MCSymbolRefExpr::Create(Sym, Ctx), MCConstantExpr::Create(1, Ctx), Ctx); break; - case X86_64_RELOC_GOT_LOAD: + case RIT_X86_64_GOTLoad: Expr = MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOTPCREL, Ctx); break; - case X86_64_RELOC_GOT: + case RIT_X86_64_GOT: Expr = MCSymbolRefExpr::Create(Sym, isPCRel ? MCSymbolRefExpr::VK_GOTPCREL : MCSymbolRefExpr::VK_GOT, Ctx); break; - case X86_64_RELOC_SUBTRACTOR: + case RIT_X86_64_Subtractor: { RelocationRef RelNext; Obj->getRelocationNext(Rel.getRawDataRefImpl(), RelNext); - any_relocation_info RENext = Obj->getRelocation(RelNext.getRawDataRefImpl()); + RelocationEntry RENext = Obj->getRelocation(RelNext.getRawDataRefImpl()); // X86_64_SUBTRACTOR must be followed by a relocation of type - // X86_64_RELOC_UNSIGNED. + // X86_64_RELOC_UNSIGNED . // NOTE: Scattered relocations don't exist on x86_64. unsigned RType = Obj->getAnyRelocationType(RENext); - if (RType != X86_64_RELOC_UNSIGNED) + if (RType != RIT_X86_64_Unsigned) report_fatal_error("Expected X86_64_RELOC_UNSIGNED after " "X86_64_RELOC_SUBTRACTOR."); |