diff options
Diffstat (limited to 'lib/DebugInfo')
-rw-r--r-- | lib/DebugInfo/DWARFContext.cpp | 10 | ||||
-rw-r--r-- | lib/DebugInfo/DWARFContext.h | 13 | ||||
-rw-r--r-- | lib/DebugInfo/DWARFUnit.h | 7 |
3 files changed, 14 insertions, 16 deletions
diff --git a/lib/DebugInfo/DWARFContext.cpp b/lib/DebugInfo/DWARFContext.cpp index 5cce8df521..37e86bd92d 100644 --- a/lib/DebugInfo/DWARFContext.cpp +++ b/lib/DebugInfo/DWARFContext.cpp @@ -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; diff --git a/lib/DebugInfo/DWARFContext.h b/lib/DebugInfo/DWARFContext.h index 823e98a6b3..96eaa70bd5 100644 --- a/lib/DebugInfo/DWARFContext.h +++ b/lib/DebugInfo/DWARFContext.h @@ -18,7 +18,6 @@ #include "DWARFDebugRangeList.h" #include "DWARFTypeUnit.h" #include "llvm/ADT/MapVector.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" #include "llvm/DebugInfo/DIContext.h" @@ -31,15 +30,15 @@ namespace llvm { class DWARFContext : public DIContext { SmallVector<DWARFCompileUnit *, 1> CUs; SmallVector<DWARFTypeUnit *, 1> TUs; - OwningPtr<DWARFDebugAbbrev> Abbrev; - OwningPtr<DWARFDebugLoc> Loc; - OwningPtr<DWARFDebugAranges> Aranges; - OwningPtr<DWARFDebugLine> Line; - OwningPtr<DWARFDebugFrame> DebugFrame; + std::unique_ptr<DWARFDebugAbbrev> Abbrev; + std::unique_ptr<DWARFDebugLoc> Loc; + std::unique_ptr<DWARFDebugAranges> Aranges; + std::unique_ptr<DWARFDebugLine> Line; + std::unique_ptr<DWARFDebugFrame> DebugFrame; SmallVector<DWARFCompileUnit *, 1> DWOCUs; SmallVector<DWARFTypeUnit *, 1> DWOTUs; - OwningPtr<DWARFDebugAbbrev> AbbrevDWO; + std::unique_ptr<DWARFDebugAbbrev> AbbrevDWO; DWARFContext(DWARFContext &) LLVM_DELETED_FUNCTION; DWARFContext &operator=(DWARFContext &) LLVM_DELETED_FUNCTION; diff --git a/lib/DebugInfo/DWARFUnit.h b/lib/DebugInfo/DWARFUnit.h index d7d9aa27a8..5b4cf0905b 100644 --- a/lib/DebugInfo/DWARFUnit.h +++ b/lib/DebugInfo/DWARFUnit.h @@ -14,7 +14,6 @@ #include "DWARFDebugInfoEntry.h" #include "DWARFDebugRangeList.h" #include "DWARFRelocMap.h" -#include "llvm/ADT/OwningPtr.h" #include <vector> namespace llvm { @@ -50,14 +49,14 @@ class DWARFUnit { std::vector<DWARFDebugInfoEntryMinimal> DieArray; class DWOHolder { - OwningPtr<object::ObjectFile> DWOFile; - OwningPtr<DWARFContext> DWOContext; + std::unique_ptr<object::ObjectFile> DWOFile; + std::unique_ptr<DWARFContext> DWOContext; DWARFUnit *DWOU; public: DWOHolder(object::ObjectFile *DWOFile); DWARFUnit *getUnit() const { return DWOU; } }; - OwningPtr<DWOHolder> DWO; + std::unique_ptr<DWOHolder> DWO; protected: virtual bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr); |