[llvm-commits] [llvm] r55173 - /llvm/trunk/include/llvm/Support/raw_ostream.h

Nicolas Geoffray nicolas.geoffray at lip6.fr
Fri Aug 22 01:44:48 PDT 2008


Author: geoffray
Date: Fri Aug 22 03:44:47 2008
New Revision: 55173

URL: http://llvm.org/viewvc/llvm-project?rev=55173&view=rev
Log:
Also overload for char, since the "char" type depends on the host.


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

Modified: llvm/trunk/include/llvm/Support/raw_ostream.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/raw_ostream.h?rev=55173&r1=55172&r2=55173&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/raw_ostream.h (original)
+++ llvm/trunk/include/llvm/Support/raw_ostream.h Fri Aug 22 03:44:47 2008
@@ -62,6 +62,13 @@
       flush_impl();
   }
   
+  raw_ostream &operator<<(char C) {
+    if (OutBufCur >= OutBufEnd)
+      flush_impl();
+    *OutBufCur++ = C;
+    return *this;
+  }
+  
   raw_ostream &operator<<(unsigned char C) {
     if (OutBufCur >= OutBufEnd)
       flush_impl();





More information about the llvm-commits mailing list