From 5db2ff50372c14b47be88974ca0e2c2178e65628 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 23 Aug 2009 21:53:47 +0000 Subject: disuade people from using ostream. llvm-svn: 79866 --- llvm/docs/CodingStandards.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'llvm/docs/CodingStandards.html') diff --git a/llvm/docs/CodingStandards.html b/llvm/docs/CodingStandards.html index ff707f3a84f..894521650a6 100644 --- a/llvm/docs/CodingStandards.html +++ b/llvm/docs/CodingStandards.html @@ -990,12 +990,14 @@ library. There are two problems with this:

Note that using the other stream headers (<sstream> for -example) is allowed normally, it is just <iostream> that is -causing problems.

- -

In addition, new code should always -use raw_ostream or -the llvm::MemoryBuffer API (for reading in files).

+example) is not problematic in this regard (just <iostream>). +However, raw_ostream provides various APIs that are better performing for almost +every use than std::ostream style APIs, so you should just use it for new +code.

+ +

New code should always +use raw_ostream for writing, or +the llvm::MemoryBuffer API for reading files.

-- cgit v1.2.3