[PATCH] D144870: [Clang][DebugInfo] Emit zero size bitfields in the debug info to delimit bitfields in different allocation units.

Juan Manuel Martinez CaamaƱo via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 15 08:44:42 PDT 2023


jmmartinez added inline comments.


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1558
+      EmitSeparator = FieldIt->isBitField();
+  }
+
----------------
probinson wrote:
> I might not be following this correctly, but it feels like EmitSeparator will end up true if the last field is a bitfield, even if there are no zero-length bitfields in front of it. The test does not cover this case (to show that the no-zero-bitfields case is handled properly).
Ouch! I feel ashamed about that loop I originally wrote.

I've added a case covering the non-zero-bitfields case and fixed the code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144870



More information about the cfe-commits mailing list