[PATCH] D68028: [clang] Add no_builtin attribute

Clement Courbet via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 10 01:44:54 PDT 2019


courbet added inline comments.


================
Comment at: clang/include/clang/Basic/Attr.td:3418
+  let Spellings = [Clang<"no_builtin">];
+  let Args = [VariadicStringArgument<"FunctionNames">];
+  let Subjects = SubjectList<[Function]>;
----------------
[nit] Should this be `BuiltinNames` ? builtins are not necessarily functions.


================
Comment at: clang/include/clang/Basic/AttrDocs.td:4409
+
+  // The compiler is not allowed to replace parts of foo's body with builtins.
+  void foo(char* data, size_t count) __attribute__((no_builtin("*"))) {
----------------
I would phrase it as `The compiler is not allowed to add any builtin to foo's body.` This covers //inserting// as well as //replacing// code with builtins.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68028





More information about the cfe-commits mailing list