summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAsmStreamer.cpp
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
commit1386a88c95d7fbf6c22a7bdaea0dd706702970a0 (patch)
treef2fa2571a6cfea6735216494552ef82f6bd72128 /llvm/lib/MC/MCAsmStreamer.cpp
parente567c8e67fbd79d7fb2096f74c90f3be72dba95b (diff)
downloadbcm5719-llvm-1386a88c95d7fbf6c22a7bdaea0dd706702970a0.tar.gz
bcm5719-llvm-1386a88c95d7fbf6c22a7bdaea0dd706702970a0.zip
Changes to fix buffering that I forgot to commit with previous patch.
llvm-svn: 94222
Diffstat (limited to 'llvm/lib/MC/MCAsmStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCAsmStreamer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp
index e284e15bca2..d4ef3ca826c 100644
--- a/llvm/lib/MC/MCAsmStreamer.cpp
+++ b/llvm/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();
}
OpenPOWER on IntegriCloud