]> granicus.if.org Git - llvm/commitdiff
[DWARF] Adjust return type of DWARFUnit::getLength().
authorIgor Kudrin <ikudrin@accesssoftek.com>
Wed, 21 Aug 2019 14:10:57 +0000 (14:10 +0000)
committerIgor Kudrin <ikudrin@accesssoftek.com>
Wed, 21 Aug 2019 14:10:57 +0000 (14:10 +0000)
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
lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
lib/DebugInfo/DWARF/DWARFTypeUnit.cpp

index 5b674f120cbd3d1a50a98cc65af517ca26e6d252..cb7c5462b4851dbbc129d4e1e8e5bd08b116172c 100644 (file)
@@ -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(); }
index 0598e2cfc5afe147677a9280d9ba402948104d1a..f59e49268288c428c95a716b6e3675fb36a8e34a 100644 (file)
@@ -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());
index d428790d290a0a03b49e4fda0b37400cb318496c..bb81090ba25cf091b3410b0d79e5cc92f4ef6a38 100644 (file)
@@ -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());