- Notifications
You must be signed in to change notification settings - Fork 14.9k
Open
Labels
Description
We currently end up with formatting like the following (running clang-format on RISCVInstrInfo.td:
let isTrap = 1 in def EBREAK : RVInstI<0b000, OPC_SYSTEM, (outs), (ins), "ebreak", "">, Sched<[]> { let rs1 = 0; let rd = 0; let imm12 = 1; }
It looks better with curly braces, but still not ideal:
let isTrap = 1 in { def EBREAK : RVInstI<0b000, OPC_SYSTEM, (outs), (ins), "ebreak", "">, Sched<[]> { let rs1 = 0; let rd = 0; let imm12 = 1; } }
IMO it would be cleanest to use something like this, i.e. break after let ... in
and no indentation.
let isTrap = 1 in def EBREAK : RVInstI<0b000, OPC_SYSTEM, (outs), (ins), "ebreak", "">, Sched<[]> { let rs1 = 0; let rd = 0; let imm12 = 1; }