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 fe005ef..1414b9b 100644
--- a/lib/Analysis/ConstantRange.cpp
+++ b/lib/Analysis/ConstantRange.cpp
@@ -225,3 +225,15 @@
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);
+}