From: John McCall Date: Tue, 8 Nov 2011 06:53:04 +0000 (+0000) Subject: Fix the printing of constants. Patch by Stepan Dyatkovskiy! X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bd3c5ecd37e760f0430c9cbd1fda5740eb7c0e27;p=oota-llvm.git Fix the printing of constants. Patch by Stepan Dyatkovskiy! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144079 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-diff/DiffConsumer.cpp b/tools/llvm-diff/DiffConsumer.cpp index c23e8fb91a1..24b372d0229 100644 --- a/tools/llvm-diff/DiffConsumer.cpp +++ b/tools/llvm-diff/DiffConsumer.cpp @@ -64,6 +64,10 @@ void DiffConsumer::printValue(Value *V, bool isL) { } return; } + if (dyn_cast(V)) { + out << *V; + return; + } unsigned N = contexts.size(); while (N > 0) { diff --git a/tools/llvm-diff/DifferenceEngine.cpp b/tools/llvm-diff/DifferenceEngine.cpp index b240d8c5da5..435cd87fa76 100644 --- a/tools/llvm-diff/DifferenceEngine.cpp +++ b/tools/llvm-diff/DifferenceEngine.cpp @@ -327,7 +327,7 @@ class FunctionDifferenceEngine { 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;