From 75900bf5cd5d0fee95c6546a919307aebe12b14f Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 9 Dec 2008 07:31:49 +0000 Subject: DisableGVCompilation should not abort on internal GlobalValue's. llvm-svn: 60750 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/ExecutionEngine') diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index 41b3ebcc6db..5d5ecc4fe77 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp @@ -553,8 +553,8 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) { addGlobalMapping(GV, Ptr); } } else { - if (isGVCompilationDisabled()) { - cerr << "Compilation of GlobalVariable is disabled!\n"; + if (isGVCompilationDisabled() && !GV->hasInternalLinkage()) { + cerr << "Compilation of non-internal GlobalValue is disabled!\n"; abort(); } // If the global hasn't been emitted to memory yet, allocate space and -- cgit v1.2.3