aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/ADT/BitSetVector.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/BitSetVector.h')
-rw-r--r--include/llvm/ADT/BitSetVector.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/ADT/BitSetVector.h b/include/llvm/ADT/BitSetVector.h
index 619bb0cf5f..835d2e09b1 100644
--- a/include/llvm/ADT/BitSetVector.h
+++ b/include/llvm/ADT/BitSetVector.h
@@ -25,6 +25,7 @@
#ifndef LLVM_ADT_BITSETVECTOR_H
#define LLVM_ADT_BITSETVECTOR_H
+#include "llvm/Support/Streams.h"
#include <bitset>
#include <vector>
#include <functional>
@@ -173,6 +174,9 @@ public:
///
/// Printing and debugging support
///
+ void print(llvm_ostream &O) const {
+ if (O.stream()) print(*O.stream());
+ }
void print(std::ostream &O) const;
void dump() const { print(std::cerr); }
@@ -248,6 +252,10 @@ inline void BitSetVector::print(std::ostream& O) const
O << "<" << (*I) << ">" << (I+1 == E? "\n" : ", ");
}
+inline llvm_ostream& operator<< (llvm_ostream& O, const BitSetVector& bset) {
+ bset.print(O);
+ return O;
+}
inline std::ostream& operator<< (std::ostream& O, const BitSetVector& bset)
{
bset.print(O);