diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-04-20 13:35:54 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-04-20 13:35:54 +0000 |
commit | 750ea6192f7ccd6960bfe87112d934aab7ac579f (patch) | |
tree | f8ae723edf5e803c3d3796daf691f22f3c7c1813 /lib/Rewrite/Rewriter.cpp | |
parent | e23ac65af568ffe611b0990818ac3a57c856a4d8 (diff) |
Be sure to flush raw_string_ostream objects in the Objective-C
rewriter, from Eric Niebler!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/Rewriter.cpp')
-rw-r--r-- | lib/Rewrite/Rewriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Rewrite/Rewriter.cpp b/lib/Rewrite/Rewriter.cpp index 2ff61363ff..10ed38b86b 100644 --- a/lib/Rewrite/Rewriter.cpp +++ b/lib/Rewrite/Rewriter.cpp @@ -300,6 +300,7 @@ bool Rewriter::ReplaceStmt(Stmt *From, Stmt *To) { std::string SStr; llvm::raw_string_ostream S(SStr); To->printPretty(S, 0, PrintingPolicy(*LangOpts)); + S.flush(); const std::string &Str = S.str(); ReplaceText(From->getLocStart(), Size, Str); @@ -310,6 +311,7 @@ std::string Rewriter::ConvertToString(Stmt *From) { std::string SStr; llvm::raw_string_ostream S(SStr); From->printPretty(S, 0, PrintingPolicy(*LangOpts)); + S.flush(); return SStr; } |