From 16062ca93add4d13b80d0ad78fa35b4bc9ecae53 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 19 Nov 2008 06:45:06 +0000 Subject: [PATCH] add a write method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59595 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Streams.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/llvm/Support/Streams.h b/include/llvm/Support/Streams.h index e9208644da4..33a4ffeb065 100644 --- a/include/llvm/Support/Streams.h +++ b/include/llvm/Support/Streams.h @@ -64,6 +64,12 @@ namespace llvm { return *this; } + template + 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; }