mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Revert a C API difference that I incorrectly introduced.
LLVMGetBitcodeModuleInContext should not take ownership on error. I will try to localize this odd api requirement, but this should get the bots green. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211213 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -3380,6 +3380,7 @@ ErrorOr<Module *> llvm::getLazyBitcodeModule(MemoryBuffer *Buffer,
|
||||
BitcodeReader *R = new BitcodeReader(Buffer, Context, BufferOwned);
|
||||
M->setMaterializer(R);
|
||||
if (std::error_code EC = R->ParseBitcodeInto(M)) {
|
||||
R->releaseBuffer(); // Never take ownership on error.
|
||||
delete M; // Also deletes R.
|
||||
return EC;
|
||||
}
|
||||
|
Reference in New Issue
Block a user