summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.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
commitfc079081b7ed8dc938c7b0b0bfbbeab010606884 (patch)
treefe331085b44d56406f295a1b5425c5688826b0cb /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
parentbae0e9ea1d38a9584d7dd301a62200cf31456852 (diff)
downloadbcm5719-llvm-fc079081b7ed8dc938c7b0b0bfbbeab010606884.tar.gz
bcm5719-llvm-fc079081b7ed8dc938c7b0b0bfbbeab010606884.zip
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 llvm-svn: 155898
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index 748693c6e18..e010785c446 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -334,7 +334,7 @@ void RuntimeDyldELF::resolveRelocation(uint8_t *LocalAddress,
void RuntimeDyldELF::processRelocationRef(const ObjRelocationInfo &Rel,
ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID,
- LocalSymbolMap &Symbols,
+ const SymbolTableMap &Symbols,
StubMap &Stubs) {
uint32_t RelType = (uint32_t)(Rel.Type & 0xffffffffL);
@@ -348,14 +348,15 @@ void RuntimeDyldELF::processRelocationRef(const ObjRelocationInfo &Rel,
<< " TargetName: " << TargetName
<< "\n");
// 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 {
OpenPOWER on IntegriCloud