From 56bac306839e01a945b2881a4ace6856c8bfd917 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 30 Nov 2004 17:41:49 +0000 Subject: Fix the JIT when being used from llvm-db llvm-svn: 18391 --- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp') diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index 0cd476984f2..dec71116404 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -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) -- cgit v1.2.3