1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Fix a problem in MCJIT identifying the module containing a global variable.

Patch by Keno Fischer!

llvm-svn: 194859
This commit is contained in:
Andrew Kaylor 2013-11-15 22:10:21 +00:00
parent afd9f31433
commit 978daf6104

View File

@ -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?
}