summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-10-09 19:52:38 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-10-09 19:52:38 +0000
commite30752c93bf3c049d0d4ed657f762789d11ef27b (patch)
tree676924c72bbbe1a114a58a0d6565c96daa2d20f6 /clang/lib/CodeGen/CGBuiltin.cpp
parentbe5613c0a7ca9d0a0916dcdbefd3719f33723abc (diff)
downloadbcm5719-llvm-e30752c93bf3c049d0d4ed657f762789d11ef27b.tar.gz
bcm5719-llvm-e30752c93bf3c049d0d4ed657f762789d11ef27b.zip
-fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.
llvm-svn: 165536
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 3a45913d3f7..cf124caec19 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -409,7 +409,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
}
case Builtin::BI__builtin_unreachable: {
if (CatchUndefined)
- EmitCheck(Builder.getFalse());
+ EmitCheck(Builder.getFalse(), "builtin_unreachable",
+ EmitCheckSourceLocation(E->getExprLoc()),
+ llvm::ArrayRef<llvm::Value *>());
else
Builder.CreateUnreachable();
OpenPOWER on IntegriCloud