diff options
author | John McCall <rjmccall@apple.com> | 2011-11-08 06:53:04 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-11-08 06:53:04 +0000 |
commit | bd3c5ecd37e760f0430c9cbd1fda5740eb7c0e27 (patch) | |
tree | 1cf424f21440b67a17c6b607c9f2073de11d7851 | |
parent | b99486fa0259044551117429fdce72243bf06e9e (diff) |
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
-rw-r--r-- | tools/llvm-diff/DiffConsumer.cpp | 4 | ||||
-rw-r--r-- | tools/llvm-diff/DifferenceEngine.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/llvm-diff/DiffConsumer.cpp b/tools/llvm-diff/DiffConsumer.cpp index c23e8fb91a..24b372d022 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<Constant>(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 b240d8c5da..435cd87fa7 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; |