diff options
| author | Mike Stump <mrs@apple.com> | 2009-12-16 03:07:12 +0000 | 
|---|---|---|
| committer | Mike Stump <mrs@apple.com> | 2009-12-16 03:07:12 +0000 | 
| commit | b85ffb689eab10ea63f24c5f489a92e2b49e44ae (patch) | |
| tree | 803d8da3cef5b07169dbc2430dbd57c37c29083a /clang/lib/CodeGen/CGBuiltin.cpp | |
| parent | 3f6f9febadbd8fd44c11d769793e9bd747b8f97d (diff) | |
| download | bcm5719-llvm-b85ffb689eab10ea63f24c5f489a92e2b49e44ae.tar.gz bcm5719-llvm-b85ffb689eab10ea63f24c5f489a92e2b49e44ae.zip | |
Add an addition check for undefined behavior for when we hit a
__builtin_unreachable.  WIP.
llvm-svn: 91499
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index c70443245c7..96bc3ef62cb 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -229,6 +229,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,      return RValue::get(Builder.CreateCall(F));    }    case Builtin::BI__builtin_unreachable: { +    if (CatchUndefined && HaveInsertPoint()) +      EmitBranch(getTrapBB());      Value *V = Builder.CreateUnreachable();      Builder.ClearInsertionPoint();      return RValue::get(V); | 

