[clang] 0c1d330 - [hmaptool] Fix dumping

Shoaib Meenai via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 3 15:18:57 PST 2022


Author: Shoaib Meenai
Date: 2022-03-03T15:18:09-08:00
New Revision: 0c1d330431f59011fd861e291d5048858a973c5a

URL: https://github.com/llvm/llvm-project/commit/0c1d330431f59011fd861e291d5048858a973c5a
DIFF: https://github.com/llvm/llvm-project/commit/0c1d330431f59011fd861e291d5048858a973c5a.diff

LOG: [hmaptool] Fix dumping

It was complaining about too many values to unpack, since our struct
unpack format string specified six members, but we only had five
variables to unpack to. The sixth value is the max value length, but
it's not used in dumping, so we can ignore it.

Reviewed By: bruno

Differential Revision: https://reviews.llvm.org/D118004

Added: 
    

Modified: 
    clang/utils/hmaptool/hmaptool

Removed: 
    


################################################################################
diff  --git a/clang/utils/hmaptool/hmaptool b/clang/utils/hmaptool/hmaptool
index 7949002020489..73897c8bb8e9f 100755
--- a/clang/utils/hmaptool/hmaptool
+++ b/clang/utils/hmaptool/hmaptool
@@ -44,7 +44,7 @@ class HeaderMap(object):
                         path,))
 
             (version, reserved, strtable_offset, num_entries,
-             num_buckets) = struct.unpack(header_fmt, data)
+             num_buckets, _) = struct.unpack(header_fmt, data)
 
             if version != 1:
                 raise SystemExit("error: %s: unknown headermap version: %r" % (


        


More information about the cfe-commits mailing list