mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Fix a double free in llvm::getBitcodeTargetTriple.
Unfortunately this is only used by ld64, so no testcase, but should fix the darwin LTO bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216618 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d445e4acdb
commit
aa9db69bb5
@ -3588,7 +3588,7 @@ ErrorOr<Module *> llvm::parseBitcodeFile(MemoryBufferRef Buffer,
|
||||
std::string llvm::getBitcodeTargetTriple(MemoryBufferRef Buffer,
|
||||
LLVMContext &Context) {
|
||||
std::unique_ptr<MemoryBuffer> Buf = MemoryBuffer::getMemBuffer(Buffer, false);
|
||||
auto R = llvm::make_unique<BitcodeReader>(Buf.get(), Context);
|
||||
auto R = llvm::make_unique<BitcodeReader>(Buf.release(), Context);
|
||||
ErrorOr<std::string> Triple = R->parseTriple();
|
||||
if (Triple.getError())
|
||||
return "";
|
||||
|
Loading…
Reference in New Issue
Block a user