Changes to fix buffering that I forgot to commit with previous patch.

llvm-svn: 94222
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp
index e284e15..d4ef3ca 100644
--- a/llvm/lib/MC/MCAsmStreamer.cpp
+++ b/llvm/lib/MC/MCAsmStreamer.cpp
@@ -136,6 +136,9 @@
   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 @@
     Comments = Comments.substr(Position+1);
   } while (!Comments.empty());
   
-  CommentStream.clear();
+  CommentToEmit.clear();
+  // Tell the comment stream that the vector changed underneath it.
+  CommentStream.resync();
 }