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

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 10:49:09 PDT 2025


yonghong-song wrote:

For BPF, I think we can do @eddyz87 suggested below:
  Given that there are alternative options: a union with additional member for discriminator, or a struct with discriminator and a union, I don't think kernel upstream would be happy to extend BTF.
This will make the BTF format consistent with the existing practice.

For non-BTF, we probably cannot do much in llvm and pahole needs to do above conversion.

Is it possible for rust frontend to generate easier debuginfo which can be easily mapped to BTF?

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


More information about the llvm-commits mailing list