Bug ID: 36230
           Summary: [clang-format] formatting of td files
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter

When applying clang-format on td files it outputs a not very readable format
for instruction definitions (and instruction patterns).

For example, the following:
clang-format llvm/lib/Target/X86/

Break the src and dst parameters and produces this kind of formatting:

multiclass mpx_bound_make<bits<8> opc, string OpcodeStr> {
  let mayLoad = 1 in {
    def 32rm : I<opc, MRMSrcMem,
                 (outs BNDR
                  : $dst),
                 (ins i32mem
                  : $src),
                 OpcodeStr #"\t{$src, $dst|$dst, $src}", []>,
               Requires<[ HasMPX, Not64BitMode ]>;
    def 64rm : RI<opc, MRMSrcMem,
                  (outs BNDR
                   : $dst),
                  (ins i64mem
                   : $src),
                  OpcodeStr #"\t{$src, $dst|$dst, $src}", []>,
               Requires<[ HasMPX, In64BitMode ]>;

At the very least I would have expected that each variable (e.g. "(outs BNDR :
$dst)") be on the same line.

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to