diff options
| author | Amy Huang <akhuang@google.com> | 2020-01-15 14:34:19 -0800 |
|---|---|---|
| committer | Hans Wennborg <hans@chromium.org> | 2020-01-17 10:40:52 +0100 |
| commit | 9007f06af0e009f41b876ae30e6b1ca96feee02e (patch) | |
| tree | d0f5750415cf8e658adf3a1839e2e3f7d3a21a0b /clang/lib/CodeGen/CGExpr.cpp | |
| parent | 572c7f6fe7b55ce5f7591fb7a445dea27329074a (diff) | |
| download | bcm5719-llvm-9007f06af0e009f41b876ae30e6b1ca96feee02e.tar.gz bcm5719-llvm-9007f06af0e009f41b876ae30e6b1ca96feee02e.zip | |
Revert "Allow system header to provide their own implementation of some builtin"
This reverts commit 921f871ac438175ca8fcfcafdfcfac4d7ddf3905 because it
causes libc++ code to trigger __warn_memset_zero_len.
See https://reviews.llvm.org/D71082.
(cherry picked from commit 3d210ed3d1880c615776b07d1916edb400c245a6)
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 8e0604181fb..b23d9df5f4b 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -4621,15 +4621,8 @@ RValue CodeGenFunction::EmitSimpleCallExpr(const CallExpr *E, } static CGCallee EmitDirectCallee(CodeGenFunction &CGF, const FunctionDecl *FD) { - if (auto builtinID = FD->getBuiltinID()) { - // Replaceable builtin provide their own implementation of a builtin. Unless - // we are in the builtin implementation itself, don't call the actual - // builtin. If we are in the builtin implementation, avoid trivial infinite - // recursion. - if (!FD->isInlineBuiltinDeclaration() || - CGF.CurFn->getName() == FD->getName()) - return CGCallee::forBuiltin(builtinID, FD); + return CGCallee::forBuiltin(builtinID, FD); } llvm::Constant *calleePtr = EmitFunctionDeclPointer(CGF.CGM, FD); |

