mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Don't try to initialize memory for a global if the allocation failed in ExecutionEngine.
Patch by Dale Martin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194831 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2ba641b957
commit
48079e0fef
@ -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
Block a user