[PATCH] D20234: Do not assume InstAlias operands appear after a blank
Sjoerd Meijer via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 06:24:23 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271666: AsmWriterEmitter.cpp assumes that all operands of a printed alias (authored by SjoerdMeijer).
Changed prior to commit:
http://reviews.llvm.org/D20234?vs=57161&id=59542#toc
Repository:
rL LLVM
http://reviews.llvm.org/D20234
Files:
llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
Index: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
@@ -1007,13 +1007,14 @@
// Code that prints the alias, replacing the operands with the ones from the
// MCInst.
O << " unsigned I = 0;\n";
- O << " while (AsmString[I] != ' ' && AsmString[I] != '\t' &&\n";
- O << " AsmString[I] != '\\0')\n";
+ O << " while (AsmString[I] != ' ' && AsmString[I] != '\\t' &&\n";
+ O << " AsmString[I] != '$' && AsmString[I] != '\\0')\n";
O << " ++I;\n";
O << " OS << '\\t' << StringRef(AsmString, I);\n";
O << " if (AsmString[I] != '\\0') {\n";
- O << " OS << '\\t';\n";
+ O << " if (AsmString[I] == ' ' || AsmString[I] == '\\t')";
+ O << " OS << '\\t';\n";
O << " do {\n";
O << " if (AsmString[I] == '$') {\n";
O << " ++I;\n";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20234.59542.patch
Type: text/x-patch
Size: 969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160603/687da078/attachment.bin>
More information about the llvm-commits
mailing list