probinson added a comment. Still one question, and haven't dug into the test in detail yet.
================ Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1552 + + auto *PreviousMDEntry = + PreviousFieldsDI.empty() ? nullptr : PreviousFieldsDI.back(); ---------------- Maybe a comment here, `// If we already emitted metadata for a 0-length bitfield, nothing to do here.` (I was briefly confused by "if the previous field is a 0-length bitfield, do nothing" until I realized this is looking at the metadata not the decl. ================ Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1563 + + assert(PreviousBitfield->isBitField()); + ---------------- Is this true for cases like ``` struct nonadjacent { char a : 8; char : 0; int b; char d : 8; }; ``` where the field `d` has a predecessor that is not a bitfield? (This might be my ignorance of how Decls are put together, but asserting that `advance` is guaranteed to get you a bitfield just seems a little odd.) ================ Comment at: clang/lib/CodeGen/CGDebugInfo.h:324 - /// Create new bit field member. - llvm::DIType *createBitFieldType(const FieldDecl *BitFieldDecl, - llvm::DIScope *RecordTy, - const RecordDecl *RD); + /// Create new bit field member + llvm::DIDerivedType *createBitFieldType(const FieldDecl *BitFieldDecl, ---------------- Please keep that final `.` ================ Comment at: clang/lib/CodeGen/CGDebugInfo.h:330 + /// Create an anonnymous zero-size separator for bit-field-decl if needed on + /// the target + llvm::DIDerivedType *createBitFieldSeparatorIfNeeded( ---------------- Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144870/new/ https://reviews.llvm.org/D144870 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits