From ce47a05c7c5251fa8d0e4e6d9610b774d53a5e7c Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 1 Aug 2014 18:09:32 +0000 Subject: Replace comment about ownership with std::unique_ptr. llvm-svn: 214533 --- llvm/tools/lli/lli.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'llvm/tools/lli/lli.cpp') diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index 43aedd1526a..f566bf7457d 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/tools/lli/lli.cpp @@ -545,12 +545,14 @@ int main(int argc, char **argv, char * const *envp) { return 1; } std::error_code EC; - object::Archive *Ar = new object::Archive(std::move(ArBuf.get()), EC); - if (EC || !Ar) { + std::unique_ptr Ar = + llvm::make_unique(std::move(ArBuf.get()), EC); + assert(Ar); + if (EC) { Err.print(argv[0], errs()); return 1; } - EE->addArchive(Ar); + EE->addArchive(std::move(Ar)); } // If the target is Cygwin/MingW and we are generating remote code, we -- cgit v1.2.3