aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
diff options
context:
space:
mode:
authorEli Bendersky <eli.bendersky@intel.com>2012-05-01 06:58:59 +0000
committerEli Bendersky <eli.bendersky@intel.com>2012-05-01 06:58:59 +0000
commitd98c9e918c9750d965c1efe9efcc9e13feacbe13 (patch)
treed85e0b1338e2838386364bc04162ac44393267b2 /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
parente499cdf10c157d447393708b3a28497e42b1b555 (diff)
RuntimeDyld code cleanup:
- There's no point having a different type for the local and global symbol tables. - Renamed SymbolTable to GlobalSymbolTable to clarify the intention - Improved const correctness where relevant git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
index a9574eb0ba..9bf043754b 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
@@ -205,7 +205,7 @@ bool RuntimeDyldMachO::resolveARMRelocation(uint8_t *LocalAddress,
void RuntimeDyldMachO::processRelocationRef(const ObjRelocationInfo &Rel,
ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID,
- LocalSymbolMap &Symbols,
+ const SymbolTableMap &Symbols,
StubMap &Stubs) {
uint32_t RelType = (uint32_t) (Rel.Type & 0xffffffffL);
@@ -219,14 +219,14 @@ void RuntimeDyldMachO::processRelocationRef(const ObjRelocationInfo &Rel,
const SymbolRef &Symbol = Rel.Symbol;
Symbol.getName(TargetName);
// First look the symbol in object file symbols.
- LocalSymbolMap::iterator lsi = Symbols.find(TargetName.data());
+ SymbolTableMap::const_iterator lsi = Symbols.find(TargetName.data());
if (lsi != Symbols.end()) {
Value.SectionID = lsi->second.first;
Value.Addend = lsi->second.second;
} else {
// Second look the symbol in global symbol table.
- StringMap<SymbolLoc>::iterator gsi = SymbolTable.find(TargetName.data());
- if (gsi != SymbolTable.end()) {
+ SymbolTableMap::const_iterator gsi = GlobalSymbolTable.find(TargetName.data());
+ if (gsi != GlobalSymbolTable.end()) {
Value.SectionID = gsi->second.first;
Value.Addend = gsi->second.second;
} else