[PATCH] D126100: Add sanitizer-specific GlobalValue attributes.

Vitaly Buka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 13:26:34 PDT 2022


vitalybuka accepted this revision.
vitalybuka added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1389
+
+      if (GV.hasSanitizerMetadata())
+        Vals.push_back(serializeSanitizerMetadata(GV.getSanitizerMetadata()));
----------------
I guess VBR encoding does not like UINT_MAX, it will occupy more space then unconditional pushback.
Please use the same approach as:  Vals.push_back(GV.hasComdat() ? VE.getComdatID(GV.getComdat()) : 0);


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126100



More information about the cfe-commits mailing list