1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

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
This commit is contained in:
Evan Cheng 2009-01-16 19:14:49 +00:00
parent 34a28dbecf
commit 2932869ed4

View File

@ -554,7 +554,10 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) {
addGlobalMapping(GV, Ptr); addGlobalMapping(GV, Ptr);
} }
} else { } 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"; cerr << "Compilation of non-internal GlobalValue is disabled!\n";
abort(); abort();
} }