From: Jeffrey Yasskin Date: Sat, 7 Nov 2009 00:26:47 +0000 (+0000) Subject: Avoid "ambiguous 'else'" warning from gcc. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9beab3fe6fa87034c156415f861c9c42d26b847a;p=oota-llvm.git Avoid "ambiguous 'else'" warning from gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86314 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index 4bbde1397c8..7cd1602e92c 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -213,11 +213,12 @@ static Constant *GetResultOfComparison(CmpInst::Predicate pred, return ConstantExpr::getCompare(pred, CLHS, CRHS); if (LHS == RHS) - if (isa(LHS->getType()) || isa(LHS->getType())) + if (isa(LHS->getType()) || isa(LHS->getType())) { if (ICmpInst::isTrueWhenEqual(pred)) return ConstantInt::getTrue(LHS->getContext()); else return ConstantInt::getFalse(LHS->getContext()); + } return 0; }