mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-16 08:08:01 +00:00
Do not assert fail or crash when a bytecode parse fails!
llvm-svn: 6284
This commit is contained in:
parent
bb4bd699e0
commit
f354fef44b
@ -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…
Reference in New Issue
Block a user