Fix the JIT when being used from llvm-db

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18391 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-11-30 17:41:49 +00:00
parent 907e9bc3f1
commit 532343b24e

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)