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;
}
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