[PATCH] D59348: [DebugInfo] Combine Trivial and NonTrivial flags

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 14:43:49 PDT 2019


aprantl added inline comments.


================
Comment at: include/llvm/IR/DebugInfoFlags.def:57-60
+HANDLE_DI_FLAG((1 << 26), NonTrivial)
 HANDLE_DI_FLAG((1 << 27), BigEndian)
 HANDLE_DI_FLAG((1 << 28), LittleEndian)
 HANDLE_DI_FLAG((1 << 29), AllCallsDescribed)
----------------
dblaikie wrote:
> @aprantl - could you review this for bitcode compatibility?
> 
> I  imagine reusing a bit for a different meaning (the exact opposite) would be problematic?
> 
> Would we have to settle for keeping the bitcode encoding as 1=trivial 0=nontrivial (only for structs/classes? Maybe enums too?) - or burn the 26th bit and keep the 30th bit as NonTrivial?
Since this only affects PDB debug info I personally don't worry about breaking bitcode compatibility, however other people may do so.

The correct way to update this is to bump the version of the records (DICompositeType) and parse the old or the new format accordingly.

If this isn't done any LLVM module with bitcode that currently uses bit 30 (which is now > Largest) will cause a verifier error and the debug info from that module will be dropped with a warning. LTO users may or may not care about this.


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

https://reviews.llvm.org/D59348





More information about the llvm-commits mailing list