aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ExecutionEngine/MCJIT/MCJIT.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index da4164e..195c458 100644
--- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -248,11 +248,11 @@ Module *MCJIT::findModuleForSymbol(const std::string &Name,
I != E; ++I) {
Module *M = *I;
Function *F = M->getFunction(Name);
- if (F && !F->empty())
+ if (F && !F->isDeclaration())
return M;
if (!CheckFunctionsOnly) {
GlobalVariable *G = M->getGlobalVariable(Name);
- if (G)
+ if (G && !G->isDeclaration())
return M;
// FIXME: Do we need to worry about global aliases?
}