Avoid "ambiguous 'else'" warning from gcc.
authorJeffrey Yasskin <jyasskin@google.com>
Sat, 7 Nov 2009 00:26:47 +0000 (00:26 +0000)
committerJeffrey Yasskin <jyasskin@google.com>
Sat, 7 Nov 2009 00:26:47 +0000 (00:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86314 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/JumpThreading.cpp

index 4bbde1397c8404b81a27a0013c56a7561694320a..7cd1602e92c4cce1e912addfa130e78624f48d91 100644 (file)
@@ -213,11 +213,12 @@ static Constant *GetResultOfComparison(CmpInst::Predicate pred,
       return ConstantExpr::getCompare(pred, CLHS, CRHS);
   
   if (LHS == RHS)
-    if (isa<IntegerType>(LHS->getType()) || isa<PointerType>(LHS->getType()))
+    if (isa<IntegerType>(LHS->getType()) || isa<PointerType>(LHS->getType())) {
       if (ICmpInst::isTrueWhenEqual(pred))
         return ConstantInt::getTrue(LHS->getContext());
       else
         return ConstantInt::getFalse(LHS->getContext());
+    }
   return 0;
 }