diff options
| author | serge-sans-paille <sguelton@redhat.com> | 2020-01-16 19:54:38 +0100 |
|---|---|---|
| committer | serge-sans-paille <sguelton@redhat.com> | 2020-01-17 09:58:32 +0100 |
| commit | d437fba8ef626b6d8b7928540f630163a9b04021 (patch) | |
| tree | 5a12018d969030bdf428b754576bcfdd21e6ad72 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 6b840834cd508aa673a30074ebd4649100bc8d9a (diff) | |
Reapply Allow system header to provide their own implementation of some builtin
This reverts commit 3d210ed3d1880c615776b07d1916edb400c245a6.
See https://reviews.llvm.org/D71082 for the patch and discussion that make it
possible to reapply this patch.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index e347f3b6f7e0..4b9d56e6ab00 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1840,6 +1840,11 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, llvm::Function *F, else if (const auto *SA = FD->getAttr<SectionAttr>()) F->setSection(SA->getName()); + if (FD->isInlineBuiltinDeclaration()) { + F->addAttribute(llvm::AttributeList::FunctionIndex, + llvm::Attribute::NoBuiltin); + } + if (FD->isReplaceableGlobalAllocationFunction()) { // A replaceable global allocation function does not act like a builtin by // default, only if it is invoked by a new-expression or delete-expression. |
