From: Chris Lattner Date: Sun, 23 Aug 2009 21:53:47 +0000 (+0000) Subject: disuade people from using ostream. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=983c592272eb59d39fd78c515e1f2701638879e0;p=oota-llvm.git disuade people from using ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79866 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/CodingStandards.html b/docs/CodingStandards.html index ff707f3a84f..894521650a6 100644 --- a/docs/CodingStandards.html +++ b/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.