[clang] [CIR] Mark record members as data, pad, or empty in CIRGen (PR #215175)

Adam Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 14 14:09:34 PDT 2026


================
@@ -727,6 +783,18 @@ convertRecordArgPassingKind(RecordArgPassingKind kind) {
   llvm_unreachable("unknown RecordArgPassingKind");
 }
 
+/// Whether the member kinds on \p recordTy answer the record's ABI emptiness
+/// the same way the AST predicate does.  A lowering that dropped a field
+/// holding data has no member left to carry that data, so it is exempt.
+[[maybe_unused]] static bool
----------------
adams381 wrote:

It's only called from the two asserts below it, so under `NDEBUG` it is unreferenced and `-Wunused-function` fires without the attribute. Same shape as `hasNoRepeatedElements` in `BasicValueFactory.cpp`.

https://github.com/llvm/llvm-project/pull/215175


More information about the cfe-commits mailing list