[llvm-commits] [llvm] r86314 - /llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
Chris Lattner
clattner at apple.com
Fri Nov 6 21:09:06 PST 2009
On Nov 6, 2009, at 4:26 PM, Jeffrey Yasskin wrote:
> 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.
That's a lame warning. If GCC had better grasp of columns/indentation
of the else, it could see that it was clearly doing the right thing.
-Chris
>
> 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;
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list