gchatelet added a comment.
Thx for the fix @thegameg
Comment at: clang/lib/CodeGen/CGCall.cpp:1845
+
+ // First, handle the language options passed through -fno-builtin[-]
+ if (LangOpts.NoBuiltin) {
Can you remove the trailing `[-]`?
Repository:
rG LLVM
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4e799ada5860: [CodeGen] Attach no-builtin attributes to
function definitions with no Decl (authored by thegameg).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.or
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
There's maybe some argument that we should be calling getNonClosureContext() or
something like that to find the parent function, at least for some attributes.
But that seems less cr
thegameg updated this revision to Diff 240914.
thegameg added a comment.
Add the attribute to all TargetDecls.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73495/new/
https://reviews.llvm.org/D73495
Files:
clang/lib/CodeGen/CGCall.cpp
clang/test/CodeGenCXX/global-init.cpp
Index:
thegameg marked 2 inline comments as done.
thegameg added inline comments.
Comment at: clang/lib/CodeGen/CGCall.cpp:1917
const auto *NBA = Fn->getAttr();
-bool HasWildcard = NBA && llvm::is_contained(NBA->builtinNames(), "*");
-if (getLangOpts().NoBuiltin
efriedma added inline comments.
Comment at: clang/lib/CodeGen/CGCall.cpp:1917
const auto *NBA = Fn->getAttr();
-bool HasWildcard = NBA && llvm::is_contained(NBA->builtinNames(), "*");
-if (getLangOpts().NoBuiltin || HasWildcard)
- FuncAttrs.addAt