[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 15 17:14:15 PDT 2024


================
@@ -2189,6 +2189,14 @@ def BTFTypeTag : TypeAttr {
   let LangOpts = [COnly];
 }
 
+def BPFFastCall : InheritableAttr,
+                  TargetSpecificAttr<TargetBPF> {
+  let Spellings = [Clang<"bpf_fastcall">];
+  let Subjects = SubjectList<[FunctionLike]>;
+  let Documentation = [BPFFastCallDocs];
+  let SimpleHandler = 1;
+}
----------------
yonghong-song wrote:

If we want to enforce attribute only for C lang, we can add `let LangOpts = [COnly];` in the above.

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


More information about the cfe-commits mailing list