mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +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:
@@ -248,11 +248,11 @@ Module *MCJIT::findModuleForSymbol(const std::string &Name,
|
|||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
Module *M = *I;
|
Module *M = *I;
|
||||||
Function *F = M->getFunction(Name);
|
Function *F = M->getFunction(Name);
|
||||||
if (F && !F->empty())
|
if (F && !F->isDeclaration())
|
||||||
return M;
|
return M;
|
||||||
if (!CheckFunctionsOnly) {
|
if (!CheckFunctionsOnly) {
|
||||||
GlobalVariable *G = M->getGlobalVariable(Name);
|
GlobalVariable *G = M->getGlobalVariable(Name);
|
||||||
if (G)
|
if (G && !G->isDeclaration())
|
||||||
return M;
|
return M;
|
||||||
// FIXME: Do we need to worry about global aliases?
|
// FIXME: Do we need to worry about global aliases?
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user