Skip to content

Commit ed41307

Browse files
committed
[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 llvm-svn: 369529
1 parent c3bf3d1 commit ed41307

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class DWARFUnit {
286286
uint8_t getDwarfOffsetByteSize() const {
287287
return Header.getDwarfOffsetByteSize();
288288
}
289-
uint32_t getLength() const { return Header.getLength(); }
289+
uint64_t getLength() const { return Header.getLength(); }
290290
uint8_t getUnitType() const { return Header.getUnitType(); }
291291
bool isTypeUnit() const { return Header.isTypeUnit(); }
292292
uint64_t getNextUnitOffset() const { return Header.getNextUnitOffset(); }

llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ using namespace llvm;
1616

1717
void DWARFCompileUnit::dump(raw_ostream &OS, DIDumpOptions DumpOpts) {
1818
OS << format("0x%08" PRIx64, getOffset()) << ": Compile Unit:"
19-
<< " length = " << format("0x%08x", getLength())
19+
<< " length = " << format("0x%08" PRIx64, getLength())
2020
<< " version = " << format("0x%04x", getVersion());
2121
if (getVersion() >= 5)
2222
OS << " unit_type = " << dwarf::UnitTypeString(getUnitType());

llvm/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ void DWARFTypeUnit::dump(raw_ostream &OS, DIDumpOptions DumpOpts) {
2424
if (DumpOpts.SummarizeTypes) {
2525
OS << "name = '" << Name << "'"
2626
<< " type_signature = " << format("0x%016" PRIx64, getTypeHash())
27-
<< " length = " << format("0x%08x", getLength()) << '\n';
27+
<< " length = " << format("0x%08" PRIx64, getLength()) << '\n';
2828
return;
2929
}
3030

3131
OS << format("0x%08" PRIx64, getOffset()) << ": Type Unit:"
32-
<< " length = " << format("0x%08x", getLength())
32+
<< " length = " << format("0x%08" PRIx64, getLength())
3333
<< " version = " << format("0x%04x", getVersion());
3434
if (getVersion() >= 5)
3535
OS << " unit_type = " << dwarf::UnitTypeString(getUnitType());

0 commit comments

Comments
 (0)