diff options
| author | Dan Gohman <gohman@apple.com> | 2010-01-26 04:12:55 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-01-26 04:12:55 +0000 |
| commit | cae6c2a16242535c0d113583c7c6ee5f580c4004 (patch) | |
| tree | 0753d7dcf36170913d1644c00a37f50884949740 | |
| parent | 8ef60fc03000f1c082e6d3a2670a30677fedef58 (diff) | |
| download | external_llvm-cae6c2a16242535c0d113583c7c6ee5f580c4004.zip external_llvm-cae6c2a16242535c0d113583c7c6ee5f580c4004.tar.gz external_llvm-cae6c2a16242535c0d113583c7c6ee5f580c4004.tar.bz2 | |
Print empty and full sets specially.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94506 91177308-0d34-0410-b5e6-96231b3b80d8
| -rw-r--r-- | lib/Support/ConstantRange.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp index ddf14e3..bfee730 100644 --- a/lib/Support/ConstantRange.cpp +++ b/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... |
