diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-02-26 21:20:35 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-02-26 21:20:35 +0000 |
commit | 7375f4f98148fc34f0c7fc765967501cdc65b24e (patch) | |
tree | 4a7aec1308b1839397847c4ab68051d08866302f /lib/Archive/ArchiveReader.cpp | |
parent | 6fe26103d71263124e3cc56c0a349cb1391208a1 (diff) | |
download | llvm-7375f4f98148fc34f0c7fc765967501cdc65b24e.tar.gz llvm-7375f4f98148fc34f0c7fc765967501cdc65b24e.tar.bz2 llvm-7375f4f98148fc34f0c7fc765967501cdc65b24e.tar.xz |
Fix auto_ptr is deprecated warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Archive/ArchiveReader.cpp')
-rw-r--r-- | lib/Archive/ArchiveReader.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Archive/ArchiveReader.cpp b/lib/Archive/ArchiveReader.cpp index a48bdd4add..14713e692c 100644 --- a/lib/Archive/ArchiveReader.cpp +++ b/lib/Archive/ArchiveReader.cpp @@ -13,13 +13,13 @@ #include "llvm/Bitcode/Archive.h" #include "ArchiveInternals.h" +#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/IR/Module.h" #include "llvm/Support/MemoryBuffer.h" #include <cstdio> #include <cstdlib> -#include <memory> using namespace llvm; /// Read a variable-bit-rate encoded unsigned integer @@ -326,14 +326,14 @@ Archive::loadArchive(std::string* error) { // Open and completely load the archive file. Archive* -Archive::OpenAndLoad(const sys::Path& file, LLVMContext& C, +Archive::OpenAndLoad(const sys::Path& File, LLVMContext& C, std::string* ErrorMessage) { - std::auto_ptr<Archive> result ( new Archive(file, C)); + OwningPtr<Archive> result ( new Archive(File, C)); if (result->mapToMemory(ErrorMessage)) - return 0; + return NULL; if (!result->loadArchive(ErrorMessage)) - return 0; - return result.release(); + return NULL; + return result.take(); } // Get all the bitcode modules from the archive @@ -440,15 +440,15 @@ Archive::loadSymbolTable(std::string* ErrorMsg) { } // Open the archive and load just the symbol tables -Archive* Archive::OpenAndLoadSymbols(const sys::Path& file, +Archive* Archive::OpenAndLoadSymbols(const sys::Path& File, LLVMContext& C, std::string* ErrorMessage) { - std::auto_ptr<Archive> result ( new Archive(file, C) ); + OwningPtr<Archive> result ( new Archive(File, C) ); if (result->mapToMemory(ErrorMessage)) - return 0; + return NULL; if (!result->loadSymbolTable(ErrorMessage)) - return 0; - return result.release(); + return NULL; + return result.take(); } // Look up one symbol in the symbol table and return the module that defines |