[llvm-commits] [llvm] r86314 - /llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
Jeffrey Yasskin
jyasskin at google.com
Fri Nov 6 16:26:48 PST 2009
Author: jyasskin
Date: Fri Nov 6 18:26:47 2009
New Revision: 86314
URL: http://llvm.org/viewvc/llvm-project?rev=86314&view=rev
Log:
Avoid "ambiguous 'else'" warning from gcc.
Modified:
llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=86314&r1=86313&r2=86314&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Fri Nov 6 18:26:47 2009
@@ -213,11 +213,12 @@
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;
}
More information about the llvm-commits
mailing list