Add printing support to ConstantRange class
authorChris Lattner <sabre@nondot.org>
Mon, 2 Sep 2002 00:18:22 +0000 (00:18 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 2 Sep 2002 00:18:22 +0000 (00:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3565 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ConstantRange.cpp
lib/Support/ConstantRange.cpp
lib/VMCore/ConstantRange.cpp
support/lib/Support/ConstantRange.cpp

index fe005efbad764b2aba5d28c007732f566cef610a..1414b9becac2bf4016021f848109fe990bd7c150 100644 (file)
@@ -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);
+}
index fe005efbad764b2aba5d28c007732f566cef610a..1414b9becac2bf4016021f848109fe990bd7c150 100644 (file)
@@ -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);
+}
index fe005efbad764b2aba5d28c007732f566cef610a..1414b9becac2bf4016021f848109fe990bd7c150 100644 (file)
@@ -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);
+}
index fe005efbad764b2aba5d28c007732f566cef610a..1414b9becac2bf4016021f848109fe990bd7c150 100644 (file)
@@ -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);
+}