summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Sema
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2013-06-15 12:13:22 +0000
committerandrew <andrew@FreeBSD.org>2013-06-15 12:13:22 +0000
commit739fcd601deec1874f0a7cdf88ec53f4a3fa337d (patch)
tree3cd5d0a8602c7a07f2ecb2559a99b73222b196cb /contrib/llvm/tools/clang/lib/Sema
parent50e34d3bd7ccbd50c94001412753c821f003afe6 (diff)
downloadFreeBSD-src-739fcd601deec1874f0a7cdf88ec53f4a3fa337d.zip
FreeBSD-src-739fcd601deec1874f0a7cdf88ec53f4a3fa337d.tar.gz
Pull in r183926 from LLVM trunk:
Allow clang to build __clear_cache on ARM. __clear_cache is special. It needs no signature, but is a real function in compiler_rt or libgcc. Patch by Andrew Turner. This allows us to build the __clear_cache function in compiler-rt.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Sema')
-rw-r--r--contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp
index e0e8bd6..f72bec0 100644
--- a/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp
+++ b/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp
@@ -8671,7 +8671,8 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D) {
// Builtin functions cannot be defined.
if (unsigned BuiltinID = FD->getBuiltinID()) {
- if (!Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID)) {
+ if (!Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID) &&
+ !Context.BuiltinInfo.isPredefinedRuntimeFunction(BuiltinID)) {
Diag(FD->getLocation(), diag::err_builtin_definition) << FD;
FD->setInvalidDecl();
}
OpenPOWER on IntegriCloud