[PATCH] D62475: Change DIEnumerator payload type to APInt

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 17:06:56 PDT 2020


aprantl requested changes to this revision.
aprantl added a comment.
This revision now requires changes to proceed.

Can you add a bitcode upgrade test that contains a .bc file with an old-style < 64bit enumerator produced by trunk llc?



================
Comment at: llvm/lib/Bitcode/Reader/MetadataLoader.cpp:1213
     bool IsUnsigned = Record[0] & 2;
+    bool IsBigInt = Record[0] & 4;
+    APInt Value;
----------------
Should we use LEB128 encoding here — does that make the parser simpler?


================
Comment at: llvm/lib/Bitcode/Reader/MetadataLoader.cpp:1220
+      SmallVector<uint64_t, 8> Words(NumWords);
+      transform(makeArrayRef(&Record[3], NumWords), Words.begin(),
+                decodeSignRotatedValue);
----------------
This needs some comments. It's not obvious what is being done here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62475/new/

https://reviews.llvm.org/D62475





More information about the llvm-commits mailing list