Add printing support to ConstantRange class
[oota-llvm.git] / 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);
+}