diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 1b88e5f5fa5..a614ec37cf6 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -3588,7 +3588,7 @@ ErrorOr llvm::parseBitcodeFile(MemoryBufferRef Buffer, std::string llvm::getBitcodeTargetTriple(MemoryBufferRef Buffer, LLVMContext &Context) { std::unique_ptr Buf = MemoryBuffer::getMemBuffer(Buffer, false); - auto R = llvm::make_unique(Buf.get(), Context); + auto R = llvm::make_unique(Buf.release(), Context); ErrorOr Triple = R->parseTriple(); if (Triple.getError()) return "";