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
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 "";