[PATCH] D92657: Fix interaction between clang and some inline builtins from glibc under _FORTIFY_SOURCE

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 05:51:06 PST 2020


serge-sans-paille updated this revision to Diff 311558.
serge-sans-paille added a comment.
Herald added a subscriber: dexonsmith.

As suggested by @rnk, spot the pattern more accurately at clang level, and use a combination of nobuiltin / builtin attributes to flag it at LLVM IR level.
What I like with that approach is that we're not preventing the emission a function Body, but just handling it in a decent way.

That's still only a possible approach, I'm of course open to other approaches!


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

https://reviews.llvm.org/D92657

Files:
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/CodeGen/CodeGenModule.h
  clang/test/CodeGen/memcpy-no-nobuiltin-if-not-emitted.c
  clang/test/CodeGen/memmove-always-inline-definition-used.c
  clang/test/CodeGen/pr9614.c
  llvm/lib/Analysis/InlineCost.cpp
  llvm/lib/IR/Function.cpp
  llvm/lib/Transforms/IPO/Inliner.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92657.311558.patch
Type: text/x-patch
Size: 14870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201214/01c4844c/attachment.bin>


More information about the llvm-commits mailing list