From 4def70d3040e73707c738f7c366737a986135edf Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 9 Oct 2012 19:52:38 +0000 Subject: -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 --- lib/CodeGen/CodeGenFunction.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index a86c2e4fa1..d7fcf9f8b2 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -544,7 +544,9 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, if (getContext().getLangOpts().CPlusPlus && !FD->hasImplicitReturnZero() && !FD->getResultType()->isVoidType() && Builder.GetInsertBlock()) { if (CatchUndefined) - EmitCheck(Builder.getFalse()); + EmitCheck(Builder.getFalse(), "missing_return", + EmitCheckSourceLocation(FD->getLocation()), + llvm::ArrayRef()); Builder.CreateUnreachable(); Builder.ClearInsertionPoint(); } -- cgit v1.2.3-18-g5258