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 | 96f9d7232c72867ee09641832d2db99f9166d6f0 (patch) | |
tree | 91d295637a6a9302e8c89893174e2d1f6280d127 | |
parent | f6814d1dc75c28fa77aeca57704f1dfdff925b1e (diff) | |
download | external_llvm-96f9d7232c72867ee09641832d2db99f9166d6f0.zip external_llvm-96f9d7232c72867ee09641832d2db99f9166d6f0.tar.gz external_llvm-96f9d7232c72867ee09641832d2db99f9166d6f0.tar.bz2 |
Add printing support to ConstantRange class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3565 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/ConstantRange.cpp | 12 | ||||
-rw-r--r-- | lib/Support/ConstantRange.cpp | 12 | ||||
-rw-r--r-- | lib/VMCore/ConstantRange.cpp | 12 | ||||
-rw-r--r-- | support/lib/Support/ConstantRange.cpp | 12 |
4 files changed, 48 insertions, 0 deletions
diff --git a/lib/Analysis/ConstantRange.cpp b/lib/Analysis/ConstantRange.cpp index fe005ef..1414b9b 100644 --- a/lib/Analysis/ConstantRange.cpp +++ b/lib/Analysis/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); +} diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp index fe005ef..1414b9b 100644 --- a/lib/Support/ConstantRange.cpp +++ b/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); +} diff --git a/lib/VMCore/ConstantRange.cpp b/lib/VMCore/ConstantRange.cpp index fe005ef..1414b9b 100644 --- a/lib/VMCore/ConstantRange.cpp +++ b/lib/VMCore/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); +} diff --git a/support/lib/Support/ConstantRange.cpp b/support/lib/Support/ConstantRange.cpp index fe005ef..1414b9b 100644 --- a/support/lib/Support/ConstantRange.cpp +++ b/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); +} |