summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-01-16 19:14:49 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-01-16 19:14:49 +0000
commit5f936ef1acfbe298591e22948ade326db528a5cc (patch)
tree9f948fc24593d782468efa4c311d1d5950e96389 /llvm/lib/ExecutionEngine
parent55ca58ed611033a02e6406a6385db411c2503849 (diff)
downloadbcm5719-llvm-5f936ef1acfbe298591e22948ade326db528a5cc.tar.gz
bcm5719-llvm-5f936ef1acfbe298591e22948ade326db528a5cc.zip
Change isGVCompilationDisabled() semantics again. It should abort on any GV that's not constant whether it's "internal" or not. In a server / client environment, GV is returned in the same block of memory as code. However, the memory might not be writable.
llvm-svn: 62336
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JIT.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
index dc502c1e8be..fd69e69c44d 100644
--- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
@@ -554,7 +554,10 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) {
addGlobalMapping(GV, Ptr);
}
} else {
- if (isGVCompilationDisabled() && !GV->hasLocalLinkage()) {
+ // GlobalVariable's which are not "constant" will cause trouble in a server
+ // situation. It's returned in the same block of memory as code which may
+ // not be writable.
+ if (isGVCompilationDisabled() && !GV->isConstant()) {
cerr << "Compilation of non-internal GlobalValue is disabled!\n";
abort();
}
OpenPOWER on IntegriCloud