X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FLTO%2FLTOModule.cpp;h=5083a59900a7dfb3d878571526a409c03821ab27;hb=0526d167a9f8fcd476f4382d933dda208a4eb5c8;hp=c4b9357e0f08f399653cc9e1cdd5fe50f2ee7b96;hpb=9f85dccfc64b5f0b0c63ddfa0a42d8615aa1fcb3;p=oota-llvm.git diff --git a/lib/LTO/LTOModule.cpp b/lib/LTO/LTOModule.cpp index c4b9357e0f0..5083a59900a 100644 --- a/lib/LTO/LTOModule.cpp +++ b/lib/LTO/LTOModule.cpp @@ -165,10 +165,11 @@ LTOModule *LTOModule::makeLTOModule(std::unique_ptr 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 +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::getMemBuffer(StringRef(startPtr, length), name, false)); } /// objcClassNameFromExpression - Get string that the data pointer points to.