[llvm] r304098 - [TableGen][X86] Improve formatting of the fold table output by indenting the body of the table and adding blank lines between tables. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun May 28 11:24:39 PDT 2017


Author: ctopper
Date: Sun May 28 13:24:39 2017
New Revision: 304098

URL: http://llvm.org/viewvc/llvm-project?rev=304098&view=rev
Log:
[TableGen][X86] Improve formatting of the fold table output by indenting the body of the table and adding blank lines between tables. NFC

Modified:
    llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp

Modified: llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp?rev=304098&r1=304097&r2=304098&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp Sun May 28 13:24:39 2017
@@ -215,11 +215,11 @@ private:
   // X86MemoryFoldTableEntry.
   void printTable(const FoldTable &Table, std::string TableName,
                   raw_ostream &OS) {
-    OS << "static const X86MemoryFoldTableEntry MemoryFold" << TableName
+    OS << "\nstatic const X86MemoryFoldTableEntry MemoryFold" << TableName
        << "[] = {\n";
 
     for (const X86FoldTableEntry &E : Table)
-      OS << E;
+      OS.indent(2) << E;
 
     OS << "};\n";
   }




More information about the llvm-commits mailing list