Replace OwningPtr<T> with std::unique_ptr<T>.
[oota-llvm.git] / lib / DebugInfo / DWARFContext.cpp
index 5cce8df5210ad41cfe0b20c59031b41448a32f0f..37e86bd92d3aa5acc2c8d07a1251991132fc23b4 100644 (file)
@@ -301,7 +301,7 @@ void DWARFContext::parseCompileUnits() {
   const DataExtractor &DIData = DataExtractor(getInfoSection().Data,
                                               isLittleEndian(), 0);
   while (DIData.isValidOffset(offset)) {
-    OwningPtr<DWARFCompileUnit> CU(new DWARFCompileUnit(
+    std::unique_ptr<DWARFCompileUnit> CU(new DWARFCompileUnit(
         getDebugAbbrev(), getInfoSection().Data, getAbbrevSection(),
         getRangeSection(), getStringSection(), StringRef(), getAddrSection(),
         &getInfoSection().Relocs, isLittleEndian()));
@@ -321,7 +321,7 @@ void DWARFContext::parseTypeUnits() {
     const DataExtractor &DIData =
         DataExtractor(I->second.Data, isLittleEndian(), 0);
     while (DIData.isValidOffset(offset)) {
-      OwningPtr<DWARFTypeUnit> TU(new DWARFTypeUnit(
+      std::unique_ptr<DWARFTypeUnit> TU(new DWARFTypeUnit(
           getDebugAbbrev(), I->second.Data, getAbbrevSection(),
           getRangeSection(), getStringSection(), StringRef(), getAddrSection(),
           &I->second.Relocs, isLittleEndian()));
@@ -338,7 +338,7 @@ void DWARFContext::parseDWOCompileUnits() {
   const DataExtractor &DIData =
       DataExtractor(getInfoDWOSection().Data, isLittleEndian(), 0);
   while (DIData.isValidOffset(offset)) {
-    OwningPtr<DWARFCompileUnit> DWOCU(new DWARFCompileUnit(
+    std::unique_ptr<DWARFCompileUnit> DWOCU(new DWARFCompileUnit(
         getDebugAbbrevDWO(), getInfoDWOSection().Data, getAbbrevDWOSection(),
         getRangeDWOSection(), getStringDWOSection(),
         getStringOffsetDWOSection(), getAddrSection(),
@@ -359,7 +359,7 @@ void DWARFContext::parseDWOTypeUnits() {
     const DataExtractor &DIData =
         DataExtractor(I->second.Data, isLittleEndian(), 0);
     while (DIData.isValidOffset(offset)) {
-      OwningPtr<DWARFTypeUnit> TU(new DWARFTypeUnit(
+      std::unique_ptr<DWARFTypeUnit> TU(new DWARFTypeUnit(
           getDebugAbbrevDWO(), I->second.Data, getAbbrevDWOSection(),
           getRangeDWOSection(), getStringDWOSection(),
           getStringOffsetDWOSection(), getAddrSection(), &I->second.Relocs,
@@ -629,7 +629,7 @@ DWARFContextInMemory::DWARFContextInMemory(object::ObjectFile *Obj) :
       if (!zlib::isAvailable() ||
           !consumeCompressedDebugSectionHeader(data, OriginalSize))
         continue;
-      OwningPtr<MemoryBuffer> UncompressedSection;
+      std::unique_ptr<MemoryBuffer> UncompressedSection;
       if (zlib::uncompress(data, UncompressedSection, OriginalSize) !=
           zlib::StatusOK)
         continue;