aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-09-08 02:08:36 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-09-08 02:08:36 +0000
commit7ac9ef1c82c779a5348ed11b3d10e01c58803b35 (patch)
tree75bafb315db7d2fb2f554e867ea52fb01cb7ae4f /lib/CodeGen/CGBuiltin.cpp
parent82f2ad456a82da1b9cb7ddfc994c8f5fa44b59e6 (diff)
-fcatch-undefined-behavior: Factor emission of the creation of, and branch to,
the trap BB out of the individual checks and into a common function, to prepare for making this code call into a runtime library. Rename the existing EmitCheck to EmitTypeCheck to clarify it and to move it out of the way of the new EmitCheck. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--lib/CodeGen/CGBuiltin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
index 1c95b57a7a..942fc5f602 100644
--- a/lib/CodeGen/CGBuiltin.cpp
+++ b/lib/CodeGen/CGBuiltin.cpp
@@ -404,7 +404,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
}
case Builtin::BI__builtin_unreachable: {
if (CatchUndefined)
- EmitBranch(getTrapBB());
+ EmitCheck(Builder.getFalse());
else
Builder.CreateUnreachable();