From b4cf387a84585744f71bdd7259f53d013c86cabc Mon Sep 17 00:00:00 2001 From: James Henderson Date: Fri, 2 Feb 2018 15:09:31 +0000 Subject: [PATCH] Fix type sizes that were causing incorrect string formatting llvm-svn: 324096 --- include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h | 2 +- lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h b/include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h index 1fe04dcb068..c4003522e83 100644 --- a/include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h +++ b/include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h @@ -51,7 +51,7 @@ public: /// Returns the length of this table, including the length field, or 0 if the /// length has not been determined (e.g. because the table has not yet been /// parsed, or there was a problem in parsing). - uint64_t length() const; + uint32_t length() const; }; } // end namespace llvm diff --git a/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp b/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp index cab725e1d25..822eae1796d 100644 --- a/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp +++ b/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp @@ -47,7 +47,7 @@ Error DWARFDebugRnglists::extract(DWARFDataExtractor Data, " has too small length (0x%" PRIx32 ") to contain a complete header", TableOffset, length()); - uint64_t End = TableOffset + length(); + uint32_t End = TableOffset + length(); if (!Data.isValidOffsetForDataOfSize(TableOffset, End - TableOffset)) return createError( "section is not large enough to contain a .debug_rnglists table " @@ -184,7 +184,7 @@ void DWARFDebugRnglists::dump(raw_ostream &OS) const { } } -uint64_t DWARFDebugRnglists::length() const { +uint32_t DWARFDebugRnglists::length() const { if (HeaderData.Length == 0) return 0; // TODO: DWARF64 support.