29 lines · plain
1// RUN: not llvm-tblgen -gen-disassembler -I %p/../../../include %s 2>&1 \2// RUN: | FileCheck %s --implicit-check-not=error:3 4include "llvm/Target/Target.td"5 6def R0 : Register<"r0">;7def RC : RegisterClass<"MyTarget", [i32], 32, (add R0)>;8 9// Used to crash.10// CHECK: error: In instruction 'I', operand #0 has 1 sub-arg names, but no sub-operands11 12def I : Instruction {13 let Size = 1;14 bits<8> Inst;15 bits<1> r;16 17 let Inst{0} = 0;18 let Inst{1} = r;19 20 let OutOperandList = (outs);21 let InOperandList = (ins (RC $r):$op);22}23 24def II : InstrInfo;25 26def MyTarget : Target {27 let InstructionSet = II;28}29