From: Chris Lattner Date: Wed, 19 Nov 2008 06:45:06 +0000 (+0000) Subject: add a write method. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=16062ca93add4d13b80d0ad78fa35b4bc9ecae53;p=oota-llvm.git add a write method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59595 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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; }