summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/Binary.cpp
diff options
context:
space:
mode:
authorAhmed Charles <ahmedcharles@gmail.com>2014-03-05 10:19:29 +0000
committerAhmed Charles <ahmedcharles@gmail.com>2014-03-05 10:19:29 +0000
commit96c9d95f5174bebe02583e40683fd6e05b649d59 (patch)
tree4fc8f19d65004392831f6b34229372ff49c88c4f /llvm/lib/Object/Binary.cpp
parent17220c188635721e948cf02d2b6ad36b267ea393 (diff)
downloadbcm5719-llvm-96c9d95f5174bebe02583e40683fd6e05b649d59.tar.gz
bcm5719-llvm-96c9d95f5174bebe02583e40683fd6e05b649d59.zip
[C++11] Replace OwningPtr::take() with OwningPtr::release().
llvm-svn: 202957
Diffstat (limited to 'llvm/lib/Object/Binary.cpp')
-rw-r--r--llvm/lib/Object/Binary.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Object/Binary.cpp b/llvm/lib/Object/Binary.cpp
index c7f868fcdd1..673a34e98a6 100644
--- a/llvm/lib/Object/Binary.cpp
+++ b/llvm/lib/Object/Binary.cpp
@@ -48,7 +48,7 @@ ErrorOr<Binary *> object::createBinary(MemoryBuffer *Source,
switch (Type) {
case sys::fs::file_magic::archive:
- return Archive::create(scopedSource.take());
+ return Archive::create(scopedSource.release());
case sys::fs::file_magic::elf_relocatable:
case sys::fs::file_magic::elf_executable:
case sys::fs::file_magic::elf_shared_object:
@@ -67,10 +67,10 @@ ErrorOr<Binary *> object::createBinary(MemoryBuffer *Source,
case sys::fs::file_magic::coff_import_library:
case sys::fs::file_magic::pecoff_executable:
case sys::fs::file_magic::bitcode:
- return ObjectFile::createSymbolicFile(scopedSource.take(), true, Type,
+ return ObjectFile::createSymbolicFile(scopedSource.release(), true, Type,
Context);
case sys::fs::file_magic::macho_universal_binary:
- return MachOUniversalBinary::create(scopedSource.take());
+ return MachOUniversalBinary::create(scopedSource.release());
case sys::fs::file_magic::unknown:
case sys::fs::file_magic::windows_resource:
// Unrecognized object file format.
@@ -83,5 +83,5 @@ ErrorOr<Binary *> object::createBinary(StringRef Path) {
OwningPtr<MemoryBuffer> File;
if (error_code EC = MemoryBuffer::getFileOrSTDIN(Path, File))
return EC;
- return createBinary(File.take());
+ return createBinary(File.release());
}
OpenPOWER on IntegriCloud