Print empty and full sets specially.
authorDan Gohman <gohman@apple.com>
Tue, 26 Jan 2010 04:12:55 +0000 (04:12 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 26 Jan 2010 04:12:55 +0000 (04:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94506 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/ConstantRange.cpp

index ddf14e33eed8b3ac76db05a4c8fb0183c5ed1cf2..bfee730db14698bedd1c1004b2ebfef80e457c93 100644 (file)
@@ -650,7 +650,12 @@ ConstantRange::lshr(const ConstantRange &Amount) const {
 /// print - Print out the bounds to a stream...
 ///
 void ConstantRange::print(raw_ostream &OS) const {
-  OS << "[" << Lower << "," << Upper << ")";
+  if (isFullSet())
+    OS << "full-set";
+  else if (isEmptySet())
+    OS << "empty-set";
+  else
+    OS << "[" << Lower << "," << Upper << ")";
 }
 
 /// dump - Allow printing from a debugger easily...