Replace OwningPtr<T> with std::unique_ptr<T>.
[oota-llvm.git] / tools / llvm-symbolizer / LLVMSymbolize.cpp
index 91abe46e095972c26e755b63003f67f9c93cfb67..31b6c68c8ae09c238f6d79f1aefb1cf659461740 100644 (file)
@@ -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);