From 96f9d7232c72867ee09641832d2db99f9166d6f0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 2 Sep 2002 00:18:22 +0000 Subject: Add printing support to ConstantRange class git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3565 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/ConstantRange.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/Support/ConstantRange.cpp') 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); +} -- cgit v1.1