[llvm] r318059 - fix printing of alias instructions by removing redundant spacing
Petar Jovanovic via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 13 10:00:24 PST 2017
Author: petarj
Date: Mon Nov 13 10:00:24 2017
New Revision: 318059
URL: http://llvm.org/viewvc/llvm-project?rev=318059&view=rev
Log:
fix printing of alias instructions by removing redundant spacing
Some alias instructions are printed with an extra space after the tab
character. Fix this by skipping that space when the tab character is printed
so that the instructions are aligned with the rest of the code.
Patch by Milos Stojanovic.
Differential Revision: https://reviews.llvm.org/D35946
Modified:
llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=318059&r1=318058&r2=318059&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Mon Nov 13 10:00:24 2017
@@ -1024,8 +1024,10 @@ void AsmWriterEmitter::EmitPrintAliasIns
O << " OS << '\\t' << StringRef(AsmString, I);\n";
O << " if (AsmString[I] != '\\0') {\n";
- O << " if (AsmString[I] == ' ' || AsmString[I] == '\\t')";
+ O << " if (AsmString[I] == ' ' || AsmString[I] == '\\t') {\n";
O << " OS << '\\t';\n";
+ O << " ++I;\n";
+ O << " }\n";
O << " do {\n";
O << " if (AsmString[I] == '$') {\n";
O << " ++I;\n";
More information about the llvm-commits
mailing list