yonghong-song wrote: > we can have a bit more meaningful and backport-friendly > > ``` > #if __bpf_relocatable_enum_attr > ``` > > (I didn't think about good name, please don't take it verbatim)
I think we can add a feature in clang and guard the above with that feature. For example, let us say we add a feature like __BPF_FEATURE_ENUM_PRESERVE_ACCESS_INDEX and then we guard with it in vmlinux.h. This way we can hide the version number. In selftest, we already have quite some examples with attribute preserve_access_index. https://github.com/llvm/llvm-project/pull/232498 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
