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

Tamir Duberstein via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 17 11:58:01 PDT 2025


================
@@ -781,16 +841,25 @@ void BTFDebug::visitFwdDeclType(const DICompositeType *CTy, bool IsUnion,
 void BTFDebug::visitCompositeType(const DICompositeType *CTy,
                                   uint32_t &TypeId) {
   auto Tag = CTy->getTag();
-  if (Tag == dwarf::DW_TAG_structure_type || Tag == dwarf::DW_TAG_union_type) {
+  switch (CTy->getTag()) {
----------------
tamird wrote:

use `Tag` here?

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


More information about the llvm-commits mailing list