summaryrefslogtreecommitdiff
path: root/lib/LTO
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
commit1a6eca243f9274b9b371b7306fa939568ce5c37f (patch)
treee08f8984bc44b63a79a4e1737a47dd66e86c1850 /lib/LTO
parent7b62be28cbc6cce31852831570a87d9699fbcecd (diff)
downloadllvm-1a6eca243f9274b9b371b7306fa939568ce5c37f.tar.gz
llvm-1a6eca243f9274b9b371b7306fa939568ce5c37f.tar.bz2
llvm-1a6eca243f9274b9b371b7306fa939568ce5c37f.tar.xz
[C++11] Replace OwningPtr::take() with OwningPtr::release().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/LTO')
-rw-r--r--lib/LTO/LTOCodeGenerator.cpp2
-rw-r--r--lib/LTO/LTOModule.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/LTO/LTOCodeGenerator.cpp b/lib/LTO/LTOCodeGenerator.cpp
index 87ea01f926..d6ca41b8df 100644
--- a/lib/LTO/LTOCodeGenerator.cpp
+++ b/lib/LTO/LTOCodeGenerator.cpp
@@ -270,7 +270,7 @@ const void* LTOCodeGenerator::compile(size_t* length,
sys::fs::remove(NativeObjectPath);
return NULL;
}
- NativeObjectFile = BuffPtr.take();
+ NativeObjectFile = BuffPtr.release();
// remove temp files
sys::fs::remove(NativeObjectPath);
diff --git a/lib/LTO/LTOModule.cpp b/lib/LTO/LTOModule.cpp
index fb20806634..4e71be8b4b 100644
--- a/lib/LTO/LTOModule.cpp
+++ b/lib/LTO/LTOModule.cpp
@@ -83,7 +83,7 @@ bool LTOModule::isBitcodeFileForTarget(const char *path,
OwningPtr<MemoryBuffer> buffer;
if (MemoryBuffer::getFile(path, buffer))
return false;
- return isTargetMatch(buffer.take(), triplePrefix);
+ return isTargetMatch(buffer.release(), triplePrefix);
}
/// isTargetMatch - Returns 'true' if the memory buffer is for the specified
@@ -103,7 +103,7 @@ LTOModule *LTOModule::makeLTOModule(const char *path, TargetOptions options,
errMsg = ec.message();
return NULL;
}
- return makeLTOModule(buffer.take(), options, errMsg);
+ return makeLTOModule(buffer.release(), options, errMsg);
}
LTOModule *LTOModule::makeLTOModule(int fd, const char *path,
@@ -123,7 +123,7 @@ LTOModule *LTOModule::makeLTOModule(int fd, const char *path,
errMsg = ec.message();
return NULL;
}
- return makeLTOModule(buffer.take(), options, errMsg);
+ return makeLTOModule(buffer.release(), options, errMsg);
}
LTOModule *LTOModule::makeLTOModule(const void *mem, size_t length,
@@ -132,7 +132,7 @@ LTOModule *LTOModule::makeLTOModule(const void *mem, size_t length,
OwningPtr<MemoryBuffer> buffer(makeBuffer(mem, length, path));
if (!buffer)
return NULL;
- return makeLTOModule(buffer.take(), options, errMsg);
+ return makeLTOModule(buffer.release(), options, errMsg);
}
LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer,
@@ -175,7 +175,7 @@ LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer,
options);
m->materializeAllPermanently();
- LTOModule *Ret = new LTOModule(m.take(), target);
+ LTOModule *Ret = new LTOModule(m.release(), target);
// We need a MCContext set up in order to get mangled names of private
// symbols. It is a bit odd that we need to report uses and definitions