Fix type sizes that were causing incorrect string formatting
authorJames Henderson <jh7370@my.bristol.ac.uk>
Fri, 2 Feb 2018 15:09:31 +0000 (15:09 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Fri, 2 Feb 2018 15:09:31 +0000 (15:09 +0000)
llvm-svn: 324096

llvm/include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h
llvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp

index 1fe04dc..c400352 100644 (file)
@@ -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
index cab725e..822eae1 100644 (file)
@@ -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.