forked from OSchip/llvm-project
Don't try to initialize memory for a global if the allocation failed in ExecutionEngine.
Patch by Dale Martin! llvm-svn: 194831
This commit is contained in:
parent
617e49ad59
commit
3b44237938
|
@ -1289,6 +1289,10 @@ void ExecutionEngine::EmitGlobalVariable(const GlobalVariable *GV) {
|
|||
if (GA == 0) {
|
||||
// If it's not already specified, allocate memory for the global.
|
||||
GA = getMemoryForGV(GV);
|
||||
|
||||
// If we failed to allocate memory for this global, return.
|
||||
if (GA == 0) return;
|
||||
|
||||
addGlobalMapping(GV, GA);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue