From 93a98d69bb6e011b9dd0ae811219f1d01b4fff32 Mon Sep 17 00:00:00 2001 From: Igor Kudrin Date: Wed, 21 Aug 2019 14:10:57 +0000 Subject: [PATCH] [DWARF] Adjust return type of DWARFUnit::getLength(). DWARFUnitHeader::getLength() returns uint64_t. DWARFUnit::getLength() should do the same. Differential Revision: https://reviews.llvm.org/D66472 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369529 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/DebugInfo/DWARF/DWARFUnit.h | 2 +- lib/DebugInfo/DWARF/DWARFCompileUnit.cpp | 2 +- lib/DebugInfo/DWARF/DWARFTypeUnit.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/DebugInfo/DWARF/DWARFUnit.h b/include/llvm/DebugInfo/DWARF/DWARFUnit.h index 5b674f120cb..cb7c5462b48 100644 --- a/include/llvm/DebugInfo/DWARF/DWARFUnit.h +++ b/include/llvm/DebugInfo/DWARF/DWARFUnit.h @@ -286,7 +286,7 @@ public: uint8_t getDwarfOffsetByteSize() const { return Header.getDwarfOffsetByteSize(); } - uint32_t getLength() const { return Header.getLength(); } + uint64_t getLength() const { return Header.getLength(); } uint8_t getUnitType() const { return Header.getUnitType(); } bool isTypeUnit() const { return Header.isTypeUnit(); } uint64_t getNextUnitOffset() const { return Header.getNextUnitOffset(); } diff --git a/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp b/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp index 0598e2cfc5a..f59e4926828 100644 --- a/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp +++ b/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp @@ -16,7 +16,7 @@ using namespace llvm; void DWARFCompileUnit::dump(raw_ostream &OS, DIDumpOptions DumpOpts) { OS << format("0x%08" PRIx64, getOffset()) << ": Compile Unit:" - << " length = " << format("0x%08x", getLength()) + << " length = " << format("0x%08" PRIx64, getLength()) << " version = " << format("0x%04x", getVersion()); if (getVersion() >= 5) OS << " unit_type = " << dwarf::UnitTypeString(getUnitType()); diff --git a/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp b/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp index d428790d290..bb81090ba25 100644 --- a/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp +++ b/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp @@ -24,12 +24,12 @@ void DWARFTypeUnit::dump(raw_ostream &OS, DIDumpOptions DumpOpts) { if (DumpOpts.SummarizeTypes) { OS << "name = '" << Name << "'" << " type_signature = " << format("0x%016" PRIx64, getTypeHash()) - << " length = " << format("0x%08x", getLength()) << '\n'; + << " length = " << format("0x%08" PRIx64, getLength()) << '\n'; return; } OS << format("0x%08" PRIx64, getOffset()) << ": Type Unit:" - << " length = " << format("0x%08x", getLength()) + << " length = " << format("0x%08" PRIx64, getLength()) << " version = " << format("0x%04x", getVersion()); if (getVersion() >= 5) OS << " unit_type = " << dwarf::UnitTypeString(getUnitType()); -- 2.49.0