mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Do not assert fail or crash when a bytecode parse fails!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
12e6465d89
commit
a2602f3dfd
@ -642,6 +642,7 @@ Module *BytecodeParser::ParseBytecode(const unsigned char *Buf,
|
||||
|
||||
TheModule = new Module(ModuleID);
|
||||
if (ParseModule(Buf, EndBuf)) {
|
||||
freeState(); // Must destroy handles before deleting module!
|
||||
delete TheModule;
|
||||
TheModule = 0;
|
||||
}
|
||||
|
@ -45,6 +45,9 @@ public:
|
||||
FirstDerivedTyID = Type::FirstDerivedTyID;
|
||||
}
|
||||
~BytecodeParser() {
|
||||
freeState();
|
||||
}
|
||||
void freeState() {
|
||||
freeTable(Values);
|
||||
freeTable(LateResolveValues);
|
||||
freeTable(ModuleValues);
|
||||
|
Loading…
x
Reference in New Issue
Block a user