summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2018-11-22 22:58:06 +0000
committerBill Wendling <isanbard@gmail.com>2018-11-22 22:58:06 +0000
commit46acc72cf41b475db1f7a534202f69476244b90d (patch)
treec80762aab75c239fa3df18632f70a8e5001ef947 /clang/lib/CodeGen
parentb23976338479b894cd426a328d737e9306beeb69 (diff)
downloadbcm5719-llvm-46acc72cf41b475db1f7a534202f69476244b90d.tar.gz
bcm5719-llvm-46acc72cf41b475db1f7a534202f69476244b90d.zip
A __builtin_constant_p() returns 0 with a function type.
llvm-svn: 347480
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 9301bfb0e90..b1323031d9a 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -1935,7 +1935,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
const Expr *Arg = E->getArg(0);
QualType ArgType = Arg->getType();
- if (!hasScalarEvaluationKind(ArgType))
+ if (!hasScalarEvaluationKind(ArgType) || ArgType->isFunctionType())
// We can only reason about scalar types.
return RValue::get(ConstantInt::get(ResultType, 0));
OpenPOWER on IntegriCloud