summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-19 06:45:06 +0000
committerChris Lattner <sabre@nondot.org>2008-11-19 06:45:06 +0000
commit48fe79e9e161fba7516406d4bcebf3023a0fb60d (patch)
treee9bcfa767901ac1597c1c9ffacfb56f415d0a11e /llvm
parent1b9ad472a46c0ee589fc5aab07f628f45819b426 (diff)
downloadbcm5719-llvm-48fe79e9e161fba7516406d4bcebf3023a0fb60d.tar.gz
bcm5719-llvm-48fe79e9e161fba7516406d4bcebf3023a0fb60d.zip
add a write method.
llvm-svn: 59595
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Support/Streams.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/Streams.h b/llvm/include/llvm/Support/Streams.h
index e9208644da4..33a4ffeb065 100644
--- a/llvm/include/llvm/Support/Streams.h
+++ b/llvm/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; }
OpenPOWER on IntegriCloud