summaryrefslogtreecommitdiff
path: root/lib/MC
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-22 21:16:10 +0000
committerChris Lattner <sabre@nondot.org>2010-01-22 21:16:10 +0000
commit14ca177beba15e86ca410c9f6fc7f48ba245dba6 (patch)
tree1b43cda3d711d8e314879474e0450d87bc97e2d2 /lib/MC
parent965df54254b9e73949fc5649b51c3ca1bed4b4a6 (diff)
downloadllvm-14ca177beba15e86ca410c9f6fc7f48ba245dba6.tar.gz
llvm-14ca177beba15e86ca410c9f6fc7f48ba245dba6.tar.bz2
llvm-14ca177beba15e86ca410c9f6fc7f48ba245dba6.tar.xz
Changes to fix buffering that I forgot to commit with previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94222 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCAsmStreamer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp
index e284e15bca..d4ef3ca826 100644
--- a/lib/MC/MCAsmStreamer.cpp
+++ b/lib/MC/MCAsmStreamer.cpp
@@ -136,6 +136,9 @@ void MCAsmStreamer::AddComment(const Twine &T) {
T.toVector(CommentToEmit);
// Each comment goes on its own line.
CommentToEmit.push_back('\n');
+
+ // Tell the comment stream that the vector changed underneath it.
+ CommentStream.resync();
}
void MCAsmStreamer::EmitCommentsAndEOL() {
@@ -158,7 +161,9 @@ void MCAsmStreamer::EmitCommentsAndEOL() {
Comments = Comments.substr(Position+1);
} while (!Comments.empty());
- CommentStream.clear();
+ CommentToEmit.clear();
+ // Tell the comment stream that the vector changed underneath it.
+ CommentStream.resync();
}