llvm.org GIT mirror llvm / 77f86ad
DisableGVCompilation should not abort on internal GlobalValue's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60750 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
2 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
262262 return LazyCompilationDisabled;
263263 }
264264
265 /// DisableGVCompilation - If called, the JIT will abort if it's asked to allocate
266 /// space and populate a GlobalVariable.
265 /// DisableGVCompilation - If called, the JIT will abort if it's asked to
266 /// allocate space and populate a GlobalVariable that is not internal to
267 /// the module.
267268 void DisableGVCompilation(bool Disabled = true) {
268269 GVCompilationDisabled = Disabled;
269270 }
552552 addGlobalMapping(GV, Ptr);
553553 }
554554 } else {
555 if (isGVCompilationDisabled()) {
556 cerr << "Compilation of GlobalVariable is disabled!\n";
555 if (isGVCompilationDisabled() && !GV->hasInternalLinkage()) {
556 cerr << "Compilation of non-internal GlobalValue is disabled!\n";
557557 abort();
558558 }
559559 // If the global hasn't been emitted to memory yet, allocate space and