aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/IRObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/IRObjectFile.cpp')
-rw-r--r--llvm/lib/Object/IRObjectFile.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Object/IRObjectFile.cpp b/llvm/lib/Object/IRObjectFile.cpp
index 964c7ed..4c050d5 100644
--- a/llvm/lib/Object/IRObjectFile.cpp
+++ b/llvm/lib/Object/IRObjectFile.cpp
@@ -270,10 +270,9 @@ llvm::object::IRObjectFile::createIRObjectFile(MemoryBufferRef Object,
std::unique_ptr<MemoryBuffer> Buff(MemoryBuffer::getMemBuffer(Object, false));
- ErrorOr<Module *> MOrErr = getLazyBitcodeModule(Buff.get(), Context);
+ ErrorOr<Module *> MOrErr = getLazyBitcodeModule(Buff, Context);
if (std::error_code EC = MOrErr.getError())
return EC;
- Buff.release();
std::unique_ptr<Module> M(MOrErr.get());
return new IRObjectFile(Object, std::move(M));