[llvm-commits] [llvm] r144079 - in /llvm/trunk/tools/llvm-diff: DiffConsumer.cpp DifferenceEngine.cpp

Nick Lewycky nicholas at mxc.ca
Tue Nov 8 00:38:53 PST 2011


John McCall wrote:
> Author: rjmccall
> Date: Tue Nov  8 00:53:04 2011
> New Revision: 144079
>
> URL: http://llvm.org/viewvc/llvm-project?rev=144079&view=rev
> Log:
> Fix the printing of constants.  Patch by Stepan Dyatkovskiy!
>
>
> Modified:
>      llvm/trunk/tools/llvm-diff/DiffConsumer.cpp
>      llvm/trunk/tools/llvm-diff/DifferenceEngine.cpp
>
> Modified: llvm/trunk/tools/llvm-diff/DiffConsumer.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-diff/DiffConsumer.cpp?rev=144079&r1=144078&r2=144079&view=diff
> ==============================================================================
> --- llvm/trunk/tools/llvm-diff/DiffConsumer.cpp (original)
> +++ llvm/trunk/tools/llvm-diff/DiffConsumer.cpp Tue Nov  8 00:53:04 2011
> @@ -64,6 +64,10 @@
>       }
>       return;
>     }
> +  if (dyn_cast<Constant>(V)) {

Please use isa<Constant>(V).

Nick

> +    out<<  *V;
> +    return;
> +  }
>
>     unsigned N = contexts.size();
>     while (N>  0) {
>
> Modified: llvm/trunk/tools/llvm-diff/DifferenceEngine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-diff/DifferenceEngine.cpp?rev=144079&r1=144078&r2=144079&view=diff
> ==============================================================================
> --- llvm/trunk/tools/llvm-diff/DifferenceEngine.cpp (original)
> +++ llvm/trunk/tools/llvm-diff/DifferenceEngine.cpp Tue Nov  8 00:53:04 2011
> @@ -327,7 +327,7 @@
>           if (LCase) {
>             if (TryUnify) tryUnify(LCase, RI->getSuccessor(I));
>             LCases.erase(CaseValue);
> -        } else if (!Difference) {
> +        } else if (Complain || !Difference) {
>             if (Complain)
>               Engine.logf("right switch has extra case %r")<<  CaseValue;
>             Difference = true;
>
>
> _______________________________________________
> 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