aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Support/Streams.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/Streams.h b/include/llvm/Support/Streams.h
index e9208644da..33a4ffeb06 100644
--- a/include/llvm/Support/Streams.h
+++ b/include/llvm/Support/Streams.h
@@ -64,6 +64,12 @@ namespace llvm {
return *this;
}
+ template <typename Ty>
+ BaseStream &write(const Ty &A, unsigned N) {
+ if (Stream) Stream->write(A, N);
+ return *this;
+ }
+
operator StreamTy* () { return Stream; }
bool operator == (const StreamTy &S) { return &S == Stream; }