diff options
| author | Ahmed Charles <ahmedcharles@gmail.com> | 2014-03-06 05:51:42 +0000 |
|---|---|---|
| committer | Ahmed Charles <ahmedcharles@gmail.com> | 2014-03-06 05:51:42 +0000 |
| commit | 56440fd8203f581b9aded68db3631ea11a72ccf2 (patch) | |
| tree | 7f80c03b91a2d762573379b2624e3f1de93e6ab6 /llvm/tools/llvm-symbolizer | |
| parent | 47c254beb732a4434f814c4415cbc60503dd331a (diff) | |
| download | bcm5719-llvm-56440fd8203f581b9aded68db3631ea11a72ccf2.tar.gz bcm5719-llvm-56440fd8203f581b9aded68db3631ea11a72ccf2.zip | |
Replace OwningPtr<T> with std::unique_ptr<T>.
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.
llvm-svn: 203083
Diffstat (limited to 'llvm/tools/llvm-symbolizer')
| -rw-r--r-- | llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp | 6 | ||||
| -rw-r--r-- | llvm/tools/llvm-symbolizer/LLVMSymbolize.h | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp b/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp index 91abe46e095..31b6c68c8ae 100644 --- a/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp +++ b/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp @@ -231,7 +231,7 @@ static std::string getDarwinDWARFResourceForPath(const std::string &Path) { } static bool checkFileCRC(StringRef Path, uint32_t CRCHash) { - OwningPtr<MemoryBuffer> MB; + std::unique_ptr<MemoryBuffer> MB; if (MemoryBuffer::getFileOrSTDIN(Path, MB)) return false; return !zlib::isAvailable() || CRCHash == zlib::crc32(MB->getBuffer()); @@ -313,7 +313,7 @@ LLVMSymbolizer::getOrCreateBinary(const std::string &Path) { Binary *DbgBin = 0; ErrorOr<Binary *> BinaryOrErr = createBinary(Path); if (!error(BinaryOrErr.getError())) { - OwningPtr<Binary> ParsedBinary(BinaryOrErr.get()); + std::unique_ptr<Binary> ParsedBinary(BinaryOrErr.get()); // Check if it's a universal binary. Bin = ParsedBinary.release(); ParsedBinariesAndObjects.push_back(Bin); @@ -361,7 +361,7 @@ LLVMSymbolizer::getObjectFileFromBinary(Binary *Bin, const std::string &ArchName std::make_pair(UB, ArchName)); if (I != ObjectFileForArch.end()) return I->second; - OwningPtr<ObjectFile> ParsedObj; + std::unique_ptr<ObjectFile> ParsedObj; if (!UB->getObjectForArch(Triple(ArchName).getArch(), ParsedObj)) { Res = ParsedObj.release(); ParsedBinariesAndObjects.push_back(Res); diff --git a/llvm/tools/llvm-symbolizer/LLVMSymbolize.h b/llvm/tools/llvm-symbolizer/LLVMSymbolize.h index 4ad3e97306d..53fd8183786 100644 --- a/llvm/tools/llvm-symbolizer/LLVMSymbolize.h +++ b/llvm/tools/llvm-symbolizer/LLVMSymbolize.h @@ -13,7 +13,6 @@ #ifndef LLVM_SYMBOLIZE_H #define LLVM_SYMBOLIZE_H -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" #include "llvm/DebugInfo/DIContext.h" #include "llvm/Object/MachOUniversal.h" @@ -104,7 +103,7 @@ private: uint64_t &Size) const; void addSymbol(const symbol_iterator &Sym); ObjectFile *Module; - OwningPtr<DIContext> DebugInfoContext; + std::unique_ptr<DIContext> DebugInfoContext; struct SymbolDesc { uint64_t Addr; |

