[llvm] r260576 - Use copy initialization.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 11:54:18 PST 2016


Author: rafael
Date: Thu Feb 11 13:54:18 2016
New Revision: 260576

URL: http://llvm.org/viewvc/llvm-project?rev=260576&view=rev
Log:
Use copy initialization.

We can do it since getMemBuffer returns a unique_ptr.

Modified:
    llvm/trunk/lib/Object/IRObjectFile.cpp

Modified: llvm/trunk/lib/Object/IRObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/IRObjectFile.cpp?rev=260576&r1=260575&r2=260576&view=diff
==============================================================================
--- llvm/trunk/lib/Object/IRObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/IRObjectFile.cpp Thu Feb 11 13:54:18 2016
@@ -305,8 +305,8 @@ llvm::object::IRObjectFile::create(Memor
   if (!BCOrErr)
     return BCOrErr.getError();
 
-  std::unique_ptr<MemoryBuffer> Buff(
-      MemoryBuffer::getMemBuffer(BCOrErr.get(), false));
+  std::unique_ptr<MemoryBuffer> Buff =
+      MemoryBuffer::getMemBuffer(BCOrErr.get(), false);
 
   ErrorOr<std::unique_ptr<Module>> MOrErr =
       getLazyBitcodeModule(std::move(Buff), Context,




More information about the llvm-commits mailing list