summaryrefslogtreecommitdiff
path: root/lib/Target/X86
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/X86')
-rw-r--r--lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp8
-rw-r--r--lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp13
2 files changed, 10 insertions, 11 deletions
diff --git a/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp b/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp
index 917c37d2ca..8f4ab4673d 100644
--- a/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp
+++ b/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp
@@ -27,11 +27,11 @@ public:
const MCExpr *createExprForRelocation(RelocationRef Rel) {
uint64_t RelType; Rel.getType(RelType);
- SymbolRef SymRef; Rel.getSymbol(SymRef);
+ symbol_iterator SymI = Rel.getSymbol();
- StringRef SymName; SymRef.getName(SymName);
- uint64_t SymAddr; SymRef.getAddress(SymAddr);
- uint64_t SymSize; SymRef.getSize(SymSize);
+ StringRef SymName; SymI->getName(SymName);
+ uint64_t SymAddr; SymI->getAddress(SymAddr);
+ uint64_t SymSize; SymI->getSize(SymSize);
int64_t Addend; getELFRelocationAddend(Rel, Addend);
MCSymbol *Sym = Ctx.GetOrCreateSymbol(SymName);
diff --git a/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp b/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp
index a76cad555d..75b5acf508 100644
--- a/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp
+++ b/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp
@@ -28,10 +28,10 @@ public:
const MachOObjectFile *Obj = cast<MachOObjectFile>(Rel.getObjectFile());
uint64_t RelType; Rel.getType(RelType);
- SymbolRef SymRef; Rel.getSymbol(SymRef);
+ symbol_iterator SymI = Rel.getSymbol();
- StringRef SymName; SymRef.getName(SymName);
- uint64_t SymAddr; SymRef.getAddress(SymAddr);
+ StringRef SymName; SymI->getName(SymName);
+ uint64_t SymAddr; SymI->getAddress(SymAddr);
RelocationEntry RE = Obj->getRelocation(Rel.getRawDataRefImpl());
bool isPCRel = Obj->getAnyRelocationPCRel(RE);
@@ -86,12 +86,11 @@ public:
const MCExpr *LHS = MCSymbolRefExpr::Create(Sym, Ctx);
- SymbolRef RSymRef;
- RelNext.getSymbol(RSymRef);
+ symbol_iterator RSymI = RelNext.getSymbol();
uint64_t RSymAddr;
- RSymRef.getAddress(RSymAddr);
+ RSymI->getAddress(RSymAddr);
StringRef RSymName;
- RSymRef.getName(RSymName);
+ RSymI->getName(RSymName);
MCSymbol *RSym = Ctx.GetOrCreateSymbol(RSymName);
if (RSym->isVariable() == false)