add a write method.
authorChris Lattner <sabre@nondot.org>
Wed, 19 Nov 2008 06:45:06 +0000 (06:45 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 19 Nov 2008 06:45:06 +0000 (06:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59595 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Streams.h

index e9208644da4a043b995d0e7a7d16600207d0f0bb..33a4ffeb065502468f6a3d853307a73b75713229 100644 (file)
@@ -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; }