From: Chris Lattner Date: Mon, 2 Sep 2002 00:18:22 +0000 (+0000) Subject: Add printing support to ConstantRange class X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=96f9d7232c72867ee09641832d2db99f9166d6f0;p=oota-llvm.git Add printing support to ConstantRange class git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3565 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ConstantRange.cpp b/lib/Analysis/ConstantRange.cpp index fe005efbad7..1414b9becac 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 fe005efbad7..1414b9becac 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 fe005efbad7..1414b9becac 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 fe005efbad7..1414b9becac 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); +}