[clang] [llvm] [DebugInfo] Emit DW_AT_bit_size for _BitInt types and others (PR #164372)

Michael Buch via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 29 04:14:24 PDT 2025


================
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -x c++ %s -debug-info-kind=standalone -gno-column-info -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -x c   %s -debug-info-kind=standalone -gno-column-info -emit-llvm -o - | FileCheck %s
+
+unsigned _BitInt(17) a;
+_BitInt(2) b;
+
+// CHECK: !DIBasicType(name: "_BitInt", size: 8, data_size: 2, encoding: DW_ATE_signed)
+// CHECK: !DIBasicType(name: "unsigned _BitInt", size: 32,  data_size: 17, encoding: DW_ATE_unsigned)
----------------
Michael137 wrote:

Is there a naming convention to named metadata fields? I've only ever seen camel-case. I.e., `dataSize`.

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


More information about the cfe-commits mailing list