[llvm] [BPF] Support for `DW_TAG_variant_part` in BTF generation (PR #155783)
Michal R via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 9 06:05:53 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)) {
+ if (E->isBitField()) {
+ return true;
+ }
+ } else if (const auto *E = dyn_cast<DICompositeType>(Element)) {
----------------
vadorovsky wrote:
I agree with both of you, we can remove it. Will do in the nest push.
https://github.com/llvm/llvm-project/pull/155783
More information about the llvm-commits
mailing list