diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-06-21 13:59:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-06-21 13:59:01 +0000 |
commit | 3a0822f094b578157263e04114075ad7df81db41 (patch) | |
tree | bc48361fe2cd1ca5f93ac01b38b183774468fc79 /lib/Bitcode/Reader/BitReader.cpp | |
parent | 85d8b2bbe386bcfe669575d05b61482d7be07e5d (diff) |
Notes
Diffstat (limited to 'lib/Bitcode/Reader/BitReader.cpp')
-rw-r--r-- | lib/Bitcode/Reader/BitReader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<Module *> ModuleOrErr = parseBitcodeFile( + ErrorOr<std::unique_ptr<Module>> 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<MemoryBuffer> Owner(unwrap(MemBuf)); - ErrorOr<Module *> ModuleOrErr = + ErrorOr<std::unique_ptr<Module>> 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; |