mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-14 15:39:00 +00:00
Fix a problem in MCJIT identifying the module containing a global variable.
Patch by Keno Fischer! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194859 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c3ec7e2273
commit
59bbf5a759
@ -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?
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user