[llvm] [BPF] Handle nested wrapper structs in BPF map definition traversal (PR #144097)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 16 13:53:24 PDT 2025


yonghong-song wrote:

IIUC, rust compiler will generate a struct chain like 'HashMap.__0.UnsafeCall.value.HashMapDef' and the last one 'HashMapDef' is the actual hash map definition based on C code.

>From that perspective, yes, your patch MAY make sense since all previous structs like 'HashMap', '__0', 'UnsafeCall' and 'value' are all internally created by rust for some safety checking so recursively going through visitMapDefType() does make sense for this case.

Please provide a *simpler* test with only necessary part so it can be checked easily. Also please use BTF/print_btf.py as @eddyz87 suggested.

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


More information about the llvm-commits mailing list