anakryiko added a comment.

Awesome, that's exactly what we need for BPF helper availability checks!

Can you please also add test that this pattern works:

  return __builtin_preserve_field_info((btf_bpf_read_branch_records)0, 
FIELD_EXISTENCE);

Also for non-func pointer typedefs, something like this would work as well, 
right?

  return __builtin_preserve_field_info(*(T *)0, FIELD_EXISTENCE);


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83242/new/

https://reviews.llvm.org/D83242



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to