From f4ccd110750a3f3fe6a107d5c74c649c2a0dc407 Mon Sep 17 00:00:00 2001 From: Ahmed Charles Date: Thu, 6 Mar 2014 05:51:42 +0000 Subject: Replace OwningPtr with std::unique_ptr. This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203083 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-rtdyld/llvm-rtdyld.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools/llvm-rtdyld') diff --git a/tools/llvm-rtdyld/llvm-rtdyld.cpp b/tools/llvm-rtdyld/llvm-rtdyld.cpp index d9e640fc35..ffac5dce82 100644 --- a/tools/llvm-rtdyld/llvm-rtdyld.cpp +++ b/tools/llvm-rtdyld/llvm-rtdyld.cpp @@ -11,7 +11,6 @@ // //===----------------------------------------------------------------------===// -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/StringMap.h" #include "llvm/DebugInfo/DIContext.h" #include "llvm/ExecutionEngine/ObjectBuffer.h" @@ -133,8 +132,8 @@ static int printLineInfoForInput() { RuntimeDyld Dyld(&MemMgr); // Load the input memory buffer. - OwningPtr InputBuffer; - OwningPtr LoadedObject; + std::unique_ptr InputBuffer; + std::unique_ptr LoadedObject; if (error_code ec = MemoryBuffer::getFileOrSTDIN(InputFileList[i], InputBuffer)) return Error("unable to read input: '" + ec.message() + "'"); @@ -148,7 +147,8 @@ static int printLineInfoForInput() { // Resolve all the relocations we can. Dyld.resolveRelocations(); - OwningPtr Context(DIContext::getDWARFContext(LoadedObject->getObjectFile())); + std::unique_ptr Context( + DIContext::getDWARFContext(LoadedObject->getObjectFile())); // Use symbol info to iterate functions in the object. for (object::symbol_iterator I = LoadedObject->begin_symbols(), @@ -191,8 +191,8 @@ static int executeInput() { InputFileList.push_back("-"); for(unsigned i = 0, e = InputFileList.size(); i != e; ++i) { // Load the input memory buffer. - OwningPtr InputBuffer; - OwningPtr LoadedObject; + std::unique_ptr InputBuffer; + std::unique_ptr LoadedObject; if (error_code ec = MemoryBuffer::getFileOrSTDIN(InputFileList[i], InputBuffer)) return Error("unable to read input: '" + ec.message() + "'"); -- cgit v1.2.3