[llvm] r238185 - [TableGen] Put a space between '*' and description in the autogenerated tablegen header. Minor cleanup in surrounding code.

Craig Topper craig.topper at gmail.com
Tue May 26 01:07:46 PDT 2015


Author: ctopper
Date: Tue May 26 03:07:45 2015
New Revision: 238185

URL: http://llvm.org/viewvc/llvm-project?rev=238185&view=rev
Log:
[TableGen] Put a space between '*' and description in the autogenerated tablegen header. Minor cleanup in surrounding code.

Modified:
    llvm/trunk/lib/TableGen/TableGenBackend.cpp

Modified: llvm/trunk/lib/TableGen/TableGenBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/TableGenBackend.cpp?rev=238185&r1=238184&r2=238185&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/TableGenBackend.cpp (original)
+++ llvm/trunk/lib/TableGen/TableGenBackend.cpp Tue May 26 03:07:45 2015
@@ -33,21 +33,20 @@ static void printLine(raw_ostream &OS, c
 
 void llvm::emitSourceFileHeader(StringRef Desc, raw_ostream &OS) {
   printLine(OS, "/*===- TableGen'erated file ", '-', "*- C++ -*-===*\\");
-  printLine(OS, "|*", ' ', "*|");
-  size_t Pos = 0U;
-  size_t PosE;
-  StringRef Prefix("|*");
+  StringRef Prefix("|* ");
   StringRef Suffix(" *|");
+  printLine(OS, Prefix, ' ', Suffix);
+  size_t Pos = 0U;
   do{
     size_t PSLen = Suffix.size() + Prefix.size();
-    PosE = Pos + ((MAX_LINE_LEN > (Desc.size() - PSLen)) ?
+    size_t PosE = Pos + ((MAX_LINE_LEN > (Desc.size() - PSLen)) ?
       Desc.size() :
       MAX_LINE_LEN - PSLen);
     printLine(OS, Prefix + Desc.slice(Pos, PosE), ' ', Suffix);
     Pos = PosE;
-  } while(Pos < Desc.size());
+  } while (Pos < Desc.size());
   printLine(OS, Prefix, ' ', Suffix);
-  printLine(OS, Prefix + " Automatically generated file, do not edit!", ' ',
+  printLine(OS, Prefix + "Automatically generated file, do not edit!", ' ',
     Suffix);
   printLine(OS, Prefix, ' ', Suffix);
   printLine(OS, "\\*===", '-', "===*/");





More information about the llvm-commits mailing list