From: Craig Topper Date: Tue, 26 May 2015 08:07:45 +0000 (+0000) Subject: [TableGen] Put a space between '*' and description in the autogenerated tablegen... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=88008cb7109800fb9f09d3ced539bc574d8eaf73 [TableGen] Put a space between '*' and description in the autogenerated tablegen header. Minor cleanup in surrounding code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238185 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/TableGen/TableGenBackend.cpp b/lib/TableGen/TableGenBackend.cpp index b4a5318bd08..9763f85c793 100644 --- a/lib/TableGen/TableGenBackend.cpp +++ b/lib/TableGen/TableGenBackend.cpp @@ -33,21 +33,20 @@ static void printLine(raw_ostream &OS, const Twine &Prefix, char Fill, 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, "\\*===", '-', "===*/");