From 401be6bddcf05ac2828730e0bb4e8b81931f8296 Mon Sep 17 00:00:00 2001 From: John McCall Date: Thu, 5 Aug 2010 17:39:44 +0000 Subject: Fix a major bug with -ftrapv and ++/--. Patch by David Keaton! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110347 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExprScalar.cpp') diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index fb277c6f0e..8d28b2485f 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1193,7 +1193,8 @@ EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV, BinOp.Ty = E->getType(); BinOp.Opcode = BinaryOperator::Add; BinOp.E = E; - return EmitOverflowCheckedBinOp(BinOp); + NextVal = EmitOverflowCheckedBinOp(BinOp); + break; } } } else { -- cgit v1.2.3