aboutsummaryrefslogtreecommitdiff
path: root/lib/Rewrite/Rewriter.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-09-13 05:16:45 +0000
committerTed Kremenek <kremenek@apple.com>2008-09-13 05:16:45 +0000
commita95d3750441ac8ad03e36af8e6e74039c9a3109d (patch)
treeff6594ca38fba0ebad2d5a63583a909bdfb72a9f /lib/Rewrite/Rewriter.cpp
parent635d04fe2a14fe79ac9b3802b66f6314ca8bc539 (diff)
Patch by Csaba Hruska!
"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch covers the AST library, but ignores Analysis lib." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/Rewriter.cpp')
-rw-r--r--lib/Rewrite/Rewriter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Rewrite/Rewriter.cpp b/lib/Rewrite/Rewriter.cpp
index e1a6651a9a..f414e1c5f2 100644
--- a/lib/Rewrite/Rewriter.cpp
+++ b/lib/Rewrite/Rewriter.cpp
@@ -16,7 +16,7 @@
#include "clang/AST/Stmt.h"
#include "clang/Lex/Lexer.h"
#include "clang/Basic/SourceManager.h"
-#include <sstream>
+#include "llvm/Support/raw_ostream.h"
using namespace clang;
void RewriteBuffer::RemoveText(unsigned OrigOffset, unsigned Size) {
@@ -166,7 +166,8 @@ bool Rewriter::ReplaceStmt(Stmt *From, Stmt *To) {
return true;
// Get the new text.
- std::ostringstream S;
+ std::string SStr;
+ llvm::raw_string_ostream S(SStr);
To->printPretty(S);
const std::string &Str = S.str();