From 3a0822f094b578157263e04114075ad7df81db41 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 21 Jun 2015 13:59:01 +0000 Subject: Vendor import of llvm trunk r240225: https://llvm.org/svn/llvm-project/llvm/trunk@240225 --- lib/Bitcode/Reader/BitReader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Bitcode/Reader/BitReader.cpp') diff --git a/lib/Bitcode/Reader/BitReader.cpp b/lib/Bitcode/Reader/BitReader.cpp index 868fbf010db37..289c76e85b4b0 100644 --- a/lib/Bitcode/Reader/BitReader.cpp +++ b/lib/Bitcode/Reader/BitReader.cpp @@ -39,7 +39,7 @@ LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef, raw_string_ostream Stream(Message); DiagnosticPrinterRawOStream DP(Stream); - ErrorOr ModuleOrErr = parseBitcodeFile( + ErrorOr> ModuleOrErr = parseBitcodeFile( Buf, Ctx, [&](const DiagnosticInfo &DI) { DI.print(DP); }); if (ModuleOrErr.getError()) { if (OutMessage) { @@ -50,7 +50,7 @@ LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef, return 1; } - *OutModule = wrap(ModuleOrErr.get()); + *OutModule = wrap(ModuleOrErr.get().release()); return 0; } @@ -64,7 +64,7 @@ LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef, std::string Message; std::unique_ptr Owner(unwrap(MemBuf)); - ErrorOr ModuleOrErr = + ErrorOr> ModuleOrErr = getLazyBitcodeModule(std::move(Owner), *unwrap(ContextRef)); Owner.release(); @@ -75,7 +75,7 @@ LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef, return 1; } - *OutM = wrap(ModuleOrErr.get()); + *OutM = wrap(ModuleOrErr.get().release()); return 0; -- cgit v1.2.3