[PATCH] D124701: [clang] Honor __attribute__((no_builtin("foo"))) on functions

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 11 11:49:06 PDT 2022


aaron.ballman added inline comments.


================
Comment at: clang/lib/CodeGen/CGExpr.cpp:5037
   if (auto builtinID = FD->getBuiltinID()) {
+    std::string AttributeNoBuiltin = "no-builtin-" + FD->getName().str();
     std::string FDInlineName = (FD->getName() + ".inline").str();
----------------
Might as well use a Twine since the next line uses one as well.


================
Comment at: clang/test/CodeGen/no-builtin-2.c:38
+}
+
+// CHECK-NOT: attributes #[[NO_NOBUILTIN]] = {{{.*}}"no-builtin-memset"{{.*}}}
----------------
We should have test coverage for the wildcard form of the attribute.


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

https://reviews.llvm.org/D124701



More information about the cfe-commits mailing list