[PATCH] D111199: [Clang][LLVM][Attr] support btf_type_tag attribute
Yonghong Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 26 21:00:24 PDT 2021
yonghong-song added a comment.
All other comments make sense. Will fix them in the next revision.
================
Comment at: clang/lib/Sema/SemaType.cpp:6526
+ }
+
+ ASTContext &Ctx = S.Context;
----------------
aaron.ballman wrote:
> Should you also validate that the type is a pointer type?
Looks like we cannot do this. For example,
int __attribute__((btf_type_tag("tag"))) *p;
When we reach `HandleBTFTypeTagAttribute`, we actually have `Type` as `int`.
We don't have information for its `parent` type.
During code generation, we have
pointer_type
attributed_type
builtin_int type
at that point, we can check pointer type's next typeloc's to decide whether it has attributed_type or not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111199/new/
https://reviews.llvm.org/D111199
More information about the llvm-commits
mailing list