diff options
author | Chris Lattner <sabre@nondot.org> | 2002-09-02 00:18:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-09-02 00:18:22 +0000 |
commit | e0bb9ebc6d8452e81cc6272e944f9d32683ca1c6 (patch) | |
tree | a3e71de5a30bd15345f2f558d8fa977fffbf414d /llvm/support/lib/Support/ConstantRange.cpp | |
parent | a17c18ce28a4baa68fa0f0b3a945b1763241a6bb (diff) | |
download | bcm5719-llvm-e0bb9ebc6d8452e81cc6272e944f9d32683ca1c6.tar.gz bcm5719-llvm-e0bb9ebc6d8452e81cc6272e944f9d32683ca1c6.zip |
Add printing support to ConstantRange class
llvm-svn: 3565
Diffstat (limited to 'llvm/support/lib/Support/ConstantRange.cpp')
-rw-r--r-- | llvm/support/lib/Support/ConstantRange.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/support/lib/Support/ConstantRange.cpp b/llvm/support/lib/Support/ConstantRange.cpp index fe005efbad7..1414b9becac 100644 --- a/llvm/support/lib/Support/ConstantRange.cpp +++ b/llvm/support/lib/Support/ConstantRange.cpp @@ -225,3 +225,15 @@ ConstantRange ConstantRange::unionWith(const ConstantRange &CR) const { return *this; } + +/// print - Print out the bounds to a stream... +/// +void ConstantRange::print(std::ostream &OS) const { + OS << "[" << Lower << "," << Upper << " )"; +} + +/// dump - Allow printing from a debugger easily... +/// +void ConstantRange::dump() const { + print(std::cerr); +} |