[llvm-commits] [llvm] r59595 - /llvm/trunk/include/llvm/Support/Streams.h

Chris Lattner sabre at nondot.org
Tue Nov 18 22:45:08 PST 2008


Author: lattner
Date: Wed Nov 19 00:45:06 2008
New Revision: 59595

URL: http://llvm.org/viewvc/llvm-project?rev=59595&view=rev
Log:
add a write method.

Modified:
    llvm/trunk/include/llvm/Support/Streams.h

Modified: llvm/trunk/include/llvm/Support/Streams.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Streams.h?rev=59595&r1=59594&r2=59595&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/Streams.h (original)
+++ llvm/trunk/include/llvm/Support/Streams.h Wed Nov 19 00:45:06 2008
@@ -64,6 +64,12 @@
       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; }





More information about the llvm-commits mailing list