summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
diff options
context:
space:
mode:
authorKeno Fischer <kfischer@college.harvard.edu>2015-01-27 19:29:00 +0000
committerKeno Fischer <kfischer@college.harvard.edu>2015-01-27 19:29:00 +0000
commit5f92a08fc051d921f75af0cab01ce6a5b255b9c4 (patch)
tree73c7be64de5fffb63c8af12ee74ffacb2b106f01 /llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
parentb1e72eca0caf9bb10d66577573d4845557e61c25 (diff)
downloadbcm5719-llvm-5f92a08fc051d921f75af0cab01ce6a5b255b9c4.tar.gz
bcm5719-llvm-5f92a08fc051d921f75af0cab01ce6a5b255b9c4.zip
[ExecutionEngine] FindFunctionNamed: Skip declarations
Summary: Basically all other methods that look up functions by name skip them if they are mere declarations. Do the same in FindFunctionNamed. Reviewers: lhames Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7068 llvm-svn: 227227
Diffstat (limited to 'llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index f41f6b4fcf6..b0cfb2c827f 100644
--- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -408,7 +408,8 @@ Function *MCJIT::FindFunctionNamedInModulePtrSet(const char *FnName,
ModulePtrSet::iterator I,
ModulePtrSet::iterator E) {
for (; I != E; ++I) {
- if (Function *F = (*I)->getFunction(FnName))
+ Function *F = (*I)->getFunction(FnName);
+ if (F && !F->isDeclaration())
return F;
}
return nullptr;
OpenPOWER on IntegriCloud