diff options
author | Chris Lattner <sabre@nondot.org> | 2002-09-02 00:18:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-09-02 00:18:26 +0000 |
commit | 7382e73f86a69634688b73bd32b4ff798805240c (patch) | |
tree | b331e6f3751dfeded2bc0c3e90f029dd8621b83b | |
parent | 96f9d7232c72867ee09641832d2db99f9166d6f0 (diff) |
Add printing support to ConstantRange class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3566 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Support/ConstantRange.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Support/ConstantRange.h b/include/llvm/Support/ConstantRange.h index 1d4ce6cc86..553fd166c7 100644 --- a/include/llvm/Support/ConstantRange.h +++ b/include/llvm/Support/ConstantRange.h @@ -18,6 +18,7 @@ #define LLVM_SUPPORT_CONSTANT_RANGE_H #include "Support/DataTypes.h" +#include <iosfwd> class ConstantIntegral; class Type; @@ -92,6 +93,19 @@ class ConstantRange { /// set before. /// ConstantRange unionWith(const ConstantRange &CR) const; + + /// print - Print out the bounds to a stream... + /// + void print(std::ostream &OS) const; + + /// dump - Allow printing from a debugger easily... + /// + void dump() const; }; +inline std::ostream &operator<<(std::ostream &OS, const ConstantRange &CR) { + CR.print(OS); + return OS; +} + #endif |