summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-09-24 16:25:55 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-09-24 16:25:55 +0000
commitcdc0060e270a3ad71acd9ea77f5ddee6ae11895a (patch)
tree75a08a52ff00ef2a95bb033d3ad68c4183c50ac9 /llvm/lib/ExecutionEngine
parent921a45c6d6b41196e9687c81e142c3009b529a98 (diff)
downloadbcm5719-llvm-cdc0060e270a3ad71acd9ea77f5ddee6ae11895a.tar.gz
bcm5719-llvm-cdc0060e270a3ad71acd9ea77f5ddee6ae11895a.zip
Add DisableGVCompilation which forces the JIT to assert when it tries to allocate space for a GlobalVariable.
llvm-svn: 56557
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/ExecutionEngine.cpp1
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JIT.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index 52a69eaea77..8cc2244272b 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -40,6 +40,7 @@ ExecutionEngine::EERegisterFn ExecutionEngine::ExceptionTableRegister = 0;
ExecutionEngine::ExecutionEngine(ModuleProvider *P) : LazyFunctionCreator(0) {
LazyCompilationDisabled = false;
+ GVCompilationDisabled = false;
SymbolSearchingDisabled = false;
Modules.push_back(P);
assert(P && "ModuleProvider is null?");
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
index 39ecc2796c7..383b3804758 100644
--- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
@@ -552,6 +552,10 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) {
addGlobalMapping(GV, Ptr);
}
} else {
+ if (isGVCompilationDisabled()) {
+ cerr << "Compilation of GlobalVariable is disabled!\n";
+ abort();
+ }
// If the global hasn't been emitted to memory yet, allocate space and
// emit it into memory. It goes in the same array as the generated
// code, jump tables, etc.
OpenPOWER on IntegriCloud