mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227227 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -142,7 +142,8 @@ bool ExecutionEngine::removeModule(Module *M) {
|
||||
|
||||
Function *ExecutionEngine::FindFunctionNamed(const char *FnName) {
|
||||
for (unsigned i = 0, e = Modules.size(); i != e; ++i) {
|
||||
if (Function *F = Modules[i]->getFunction(FnName))
|
||||
Function *F = Modules[i]->getFunction(FnName);
|
||||
if (F && !F->isDeclaration())
|
||||
return F;
|
||||
}
|
||||
return nullptr;
|
||||
|
Reference in New Issue
Block a user