Pass a unique_ptr<MemoryBuffer> to the constructors in the Binary hierarchy.
[oota-llvm.git] / tools / llvm-ar / llvm-ar.cpp
index 3ca1a910740bb41b10d51e3f9b0df2c5f0a9965a..60886bb7b110ec8006cd3fa7398c9ad25925732f 100644 (file)
@@ -938,7 +938,7 @@ static int performOperation(ArchiveOperation Operation) {
   }
 
   if (!EC) {
-    object::Archive Archive(Buf.release(), EC);
+    object::Archive Archive(std::move(Buf), EC);
 
     if (EC) {
       errs() << ToolName << ": error loading '" << ArchiveName