mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
allow attaching comments to raw text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100292 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -645,13 +645,10 @@ void MCAsmStreamer::EmitInstruction(const MCInst &Inst) {
|
|||||||
/// the specified string in the output .s file. This capability is
|
/// the specified string in the output .s file. This capability is
|
||||||
/// indicated by the hasRawTextSupport() predicate.
|
/// indicated by the hasRawTextSupport() predicate.
|
||||||
void MCAsmStreamer::EmitRawText(StringRef String) {
|
void MCAsmStreamer::EmitRawText(StringRef String) {
|
||||||
if (!CommentToEmit.empty() || CommentStream.GetNumBytesInBuffer() != 0)
|
if (!String.empty() && String.back() == '\n')
|
||||||
EmitCommentsAndEOL();
|
String = String.substr(0, String.size()-1);
|
||||||
|
|
||||||
OS << String;
|
OS << String;
|
||||||
|
EmitEOL();
|
||||||
if (!String.empty() && String.back() != '\n')
|
|
||||||
OS << '\n';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCAsmStreamer::Finish() {
|
void MCAsmStreamer::Finish() {
|
||||||
|
Reference in New Issue
Block a user