mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
[MC] When MCInstPrint::printAnnotation uses a comment stream, it has to ensure
that each comment ends with a newline to match the definition in the header file. This is part of <rdar://problem/14687488>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191787 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
187c774a76
commit
db3de10637
@ -31,9 +31,13 @@ void MCInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const {
|
||||
|
||||
void MCInstPrinter::printAnnotation(raw_ostream &OS, StringRef Annot) {
|
||||
if (!Annot.empty()) {
|
||||
if (CommentStream)
|
||||
if (CommentStream) {
|
||||
(*CommentStream) << Annot;
|
||||
else
|
||||
// By definition (see MCInstPrinter.h), CommentStream must end with
|
||||
// a newline after each comment.
|
||||
if (Annot.back() != '\n')
|
||||
(*CommentStream) << '\n';
|
||||
} else
|
||||
OS << " " << MAI.getCommentString() << " " << Annot;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user