From 983c592272eb59d39fd78c515e1f2701638879e0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 23 Aug 2009 21:53:47 +0000 Subject: [PATCH] disuade people from using ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79866 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CodingStandards.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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.

-- 2.34.1