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() {
Comments = Comments.substr(Position+1);
} while (!Comments.empty());
- CommentStream.clear();
+ CommentToEmit.clear();
+ // Tell the comment stream that the vector changed underneath it.
+ CommentStream.resync();
}