yonghong-song added a comment. In D83242#2154145 <https://reviews.llvm.org/D83242#2154145>, @ast wrote:
> lgtm. > curious what happens when type is defined within args, like: > __builtin_preserve_field_info(*(struct { int a; } *)0, 2); -bash-4.4$ clang -target bpf -O2 -g -S t1.c t1.c:3:40: error: __builtin_preserve_field_info argument 1 invalid return __builtin_preserve_field_info(*(struct { int a; } *)0, 2); it will flag out an error since an non-empty name is required as we will need it to generate relocation. if (!RT || RT->getDecl()->getDeclName().isEmpty()) With an name, it works properly. -bash-4.4$ cat t1.c unsigned unit1() { return __builtin_preserve_field_info(*(struct t { int a; } *)0, 2); } -bash-4.4$ clang -target bpf -O2 -g -S t1.c -bash-4.4$ 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