From 0d50598d71c5cc81c0e777a0ddf3e692e634f565 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 24 Jun 2014 13:56:32 +0000 Subject: Pass a unique_ptr to the constructors in the Binary hierarchy. Once the objects are constructed, they own the buffer. Passing a unique_ptr makes that clear. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211595 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-ar/llvm-ar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/llvm-ar') diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index 3ca1a91074..60886bb7b1 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -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 -- cgit v1.2.3