From 837ada7692a87a3a561172f987a69413faf07c75 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 26 Jan 2010 04:12:55 +0000 Subject: [PATCH] Print empty and full sets specially. llvm-svn: 94506 --- llvm/lib/Support/ConstantRange.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp index ddf14e33eed8..bfee730db146 100644 --- a/llvm/lib/Support/ConstantRange.cpp +++ b/llvm/lib/Support/ConstantRange.cpp @@ -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...