From: Daniel Dunbar
The preferred replacement for stream functionality is the -llvm::raw_ostream class (for writing to output streams of various -sorts) and the llvm::MemoryBuffer API (for reading in files).
+In addition, new code should always +use raw_ostream or +the llvm::MemoryBuffer API (for reading in files).
@@ -938,6 +939,26 @@ it's better to use a literal '\n'. + +LLVM includes a lightweight, simple, and efficient stream implementation +in llvm/Support/raw_ostream.h which provides all of the common features +of std::iostream. All new code should use raw_ostream instead +of iostream.
+ +Unlike std::iostream, raw_ostream is not a template and can +be forward declared as class raw_ostream. Public headers should +generally not include the raw_ostream header, but use forward +declarations and constant references to raw_ostream instances.
+ +