Add an addition check for undefined behavior for when we hit a
__builtin_unreachable. WIP. llvm-svn: 91499
This commit is contained in:
parent
3f6f9febad
commit
b85ffb689e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue