Fix the JIT when being used from llvm-db

llvm-svn: 18391
This commit is contained in:
Chris Lattner 2004-11-30 17:41:49 +00:00
parent f4b262a3ec
commit 56bac30683
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ void *JITEmitter::getPointerToGlobal(GlobalValue *V, void *Reference,
void *ResultPtr = TheJIT->getPointerToGlobalIfAvailable(F);
if (ResultPtr) return ResultPtr;
if (F->hasExternalLinkage()) {
if (F->hasExternalLinkage() && F->isExternal()) {
// If this is an external function pointer, we can force the JIT to
// 'compile' it, which really just adds it to the map.
if (DoesntNeedStub)