[all-commits] [llvm/llvm-project] 3d6f49: Simplify handling of builtin with inline redefinition
serge-sans-paille via All-commits
all-commits at lists.llvm.org
Tue Sep 28 04:24:41 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3d6f49a56995b845c40be5827ded5d1e3f692cec
https://github.com/llvm/llvm-project/commit/3d6f49a56995b845c40be5827ded5d1e3f692cec
Author: serge-sans-paille <sguelton at redhat.com>
Date: 2021-09-28 (Tue, 28 Sep 2021)
Changed paths:
M clang/lib/CodeGen/CodeGenFunction.cpp
M clang/lib/CodeGen/CodeGenModule.cpp
A clang/test/CodeGen/memcpy-inline-builtin.c
R clang/test/CodeGen/memcpy-no-nobuiltin-if-not-emitted.c
M clang/test/CodeGen/memcpy-nobuiltin.c
M clang/test/CodeGen/pr9614.c
Log Message:
-----------
Simplify handling of builtin with inline redefinition
It is a common practice in glibc header to provide an inline redefinition of an
existing function. It is especially the case for fortified function.
Clang currently has an imperfect approach to the problem, using a combination of
trivially recursive function detection and noinline attribute.
Simplify the logic by suffixing these functions by `.inline` during codegen, so
that they are not recognized as builtin by llvm.
After that patch, clang passes all tests from https://github.com/serge-sans-paille/fortify-test-suite
Differential Revision: https://reviews.llvm.org/D109967
More information about the All-commits
mailing list