summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-06-26 12:18:49 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-06-26 12:18:49 +0000
commit2fa80cc5fde697acfc8c69c38e2648aee063d5b7 (patch)
treeed0c7c8b7d72f217cfd0af85bef7b4a3f0027613 /llvm/lib/ExecutionEngine/RuntimeDyld
parent99a9343ae6b9244b8933cef099e6fff70610f59b (diff)
downloadbcm5719-llvm-2fa80cc5fde697acfc8c69c38e2648aee063d5b7.tar.gz
bcm5719-llvm-2fa80cc5fde697acfc8c69c38e2648aee063d5b7.zip
Simplify getSymbolType.
This is still a really odd function. Most calls are in object format specific contexts and should probably be replaced with a more direct query, but at least now this is not too obnoxious to use. llvm-svn: 240777
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp3
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index 22de8c8ba29..6df3d778565 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -175,8 +175,7 @@ RuntimeDyldImpl::loadObjectImpl(const object::ObjectFile &Obj) {
if (IsCommon)
CommonSymbols.push_back(*I);
else {
- object::SymbolRef::Type SymType;
- Check(I->getType(SymType));
+ object::SymbolRef::Type SymType = I->getType();
if (SymType == object::SymbolRef::ST_Function ||
SymType == object::SymbolRef::ST_Data ||
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index 5f288f18e67..12b707f6702 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -1082,7 +1082,7 @@ relocation_iterator RuntimeDyldELF::processRelocationRef(
RTDyldSymbolTable::const_iterator gsi = GlobalSymbolTable.end();
if (Symbol != Obj.symbol_end()) {
gsi = GlobalSymbolTable.find(TargetName.data());
- Symbol->getType(SymType);
+ SymType = Symbol->getType();
}
if (gsi != GlobalSymbolTable.end()) {
const auto &SymInfo = gsi->second;
OpenPOWER on IntegriCloud