Remove uses of std::auto_ptr, it's going away in C++17.

std::unique_ptr is pretty much a drop-in replacement here. Also remove nullptr
checks that are doing nothing.

llvm-svn: 313265
This commit is contained in:
Benjamin Kramer
2017-09-14 15:01:55 +00:00
parent 0d4fd5b668
commit e1a6074b52
5 changed files with 5 additions and 14 deletions

View File

@@ -451,7 +451,7 @@ ObjectFile *ObjectFileELF::CreateMemoryInstance(
if (ELFHeader::MagicBytesMatch(magic)) {
unsigned address_size = ELFHeader::AddressSizeInBytes(magic);
if (address_size == 4 || address_size == 8) {
std::auto_ptr<ObjectFileELF> objfile_ap(
std::unique_ptr<ObjectFileELF> objfile_ap(
new ObjectFileELF(module_sp, data_sp, process_sp, header_addr));
ArchSpec spec;
if (objfile_ap->GetArchitecture(spec) &&