diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-10-09 19:52:38 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-10-09 19:52:38 +0000 |
commit | 4def70d3040e73707c738f7c366737a986135edf (patch) | |
tree | 0699902c58619f54157b8802bd8d25909da63385 /lib/CodeGen/CGBuiltin.cpp | |
parent | d372a70c6845efcfc88edc37341f795fc70750c7 (diff) |
-fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBuiltin.cpp')
-rw-r--r-- | lib/CodeGen/CGBuiltin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index 3a45913d3f..cf124caec1 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/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(); |