[llvm] [BPF] Support for `DW_TAG_variant_part` in BTF generation (PR #155783)

Tamir Duberstein via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 1 08:14:49 PDT 2025


================
@@ -667,6 +686,23 @@ int BTFDebug::genBTFTypeTags(const DIDerivedType *DTy, int BaseTypeId) {
   return TmpTypeId;
 }
 
+// Check whether the given composite type has any bitfield members
+bool BTFDebug::structHasBitField(const DICompositeType *CTy) {
+  const DINodeArray Elements = CTy->getElements();
+  for (const auto *Element : Elements) {
+    if (const auto *E = dyn_cast<DIDerivedType>(Element)) {
----------------
tamird wrote:

Should this switch on tag like the others?

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


More information about the llvm-commits mailing list