mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-06 05:33:28 +00:00
Fix a bug where calling materializeModule could corrupt the module, reading
multiple copies of the function into the Function*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35831 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5464b96073
commit
24e90d3c5b
@ -1672,15 +1672,14 @@ bool BytecodeReader::ParseAllFunctionBodies(std::string* ErrMsg) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
LazyFunctionMap::iterator Fi = LazyFunctionLoadMap.begin();
|
for (LazyFunctionMap::iterator I = LazyFunctionLoadMap.begin(),
|
||||||
LazyFunctionMap::iterator Fe = LazyFunctionLoadMap.end();
|
E = LazyFunctionLoadMap.end(); I != E; ++I) {
|
||||||
|
Function *Func = I->first;
|
||||||
while (Fi != Fe) {
|
if (Func->hasNotBeenReadFromBytecode()) {
|
||||||
Function* Func = Fi->first;
|
BlockStart = At = I->second.Buf;
|
||||||
BlockStart = At = Fi->second.Buf;
|
BlockEnd = I->second.EndBuf;
|
||||||
BlockEnd = Fi->second.EndBuf;
|
ParseFunctionBody(Func);
|
||||||
ParseFunctionBody(Func);
|
}
|
||||||
++Fi;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user