[llvm-commits] [llvm] r60750 - in /llvm/trunk: include/llvm/ExecutionEngine/ExecutionEngine.h lib/ExecutionEngine/JIT/JIT.cpp
Evan Cheng
evan.cheng at apple.com
Mon Dec 8 23:31:49 PST 2008
Author: evancheng
Date: Tue Dec 9 01:31:49 2008
New Revision: 60750
URL: http://llvm.org/viewvc/llvm-project?rev=60750&view=rev
Log:
DisableGVCompilation should not abort on internal GlobalValue's.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h
llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h?rev=60750&r1=60749&r2=60750&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h Tue Dec 9 01:31:49 2008
@@ -263,8 +263,9 @@
return LazyCompilationDisabled;
}
- /// DisableGVCompilation - If called, the JIT will abort if it's asked to allocate
- /// space and populate a GlobalVariable.
+ /// DisableGVCompilation - If called, the JIT will abort if it's asked to
+ /// allocate space and populate a GlobalVariable that is not internal to
+ /// the module.
void DisableGVCompilation(bool Disabled = true) {
GVCompilationDisabled = Disabled;
}
Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp?rev=60750&r1=60749&r2=60750&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp Tue Dec 9 01:31:49 2008
@@ -553,8 +553,8 @@
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
More information about the llvm-commits
mailing list