summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-08-17 22:37:39 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-08-17 22:37:39 +0000
commita6d0b2f801414d849b26c4744bd9f782f445db8b (patch)
tree8f7f7b84b1b59466c5da014b13f960f15f5c2d22 /llvm/lib/LTO
parent57ba55cbc3ee4ab950a9a8d87b920c16f088b82e (diff)
downloadbcm5719-llvm-a6d0b2f801414d849b26c4744bd9f782f445db8b.tar.gz
bcm5719-llvm-a6d0b2f801414d849b26c4744bd9f782f445db8b.zip
Return a std::uinque_ptr. Every caller was already using one.
llvm-svn: 215858
Diffstat (limited to 'llvm/lib/LTO')
-rw-r--r--llvm/lib/LTO/LTOModule.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index c4b9357e0f0..5083a59900a 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -165,10 +165,11 @@ LTOModule *LTOModule::makeLTOModule(std::unique_ptr<MemoryBuffer> Buffer,
}
/// Create a MemoryBuffer from a memory range with an optional name.
-MemoryBuffer *LTOModule::makeBuffer(const void *mem, size_t length,
- StringRef name) {
+std::unique_ptr<MemoryBuffer>
+LTOModule::makeBuffer(const void *mem, size_t length, StringRef name) {
const char *startPtr = (const char*)mem;
- return MemoryBuffer::getMemBuffer(StringRef(startPtr, length), name, false);
+ return std::unique_ptr<MemoryBuffer>(
+ MemoryBuffer::getMemBuffer(StringRef(startPtr, length), name, false));
}
/// objcClassNameFromExpression - Get string that the data pointer points to.
OpenPOWER on IntegriCloud