1 // RUN: not llvm-tblgen -gen-instr-info -I %p/../../include %s 2>&1 | FileCheck %s
3 // This test verifies that TableGen is displaying an error when mapped instruction
4 // does not contain a field listed under RowFields.
6 include "llvm/Target/Target.td"
8 class SimpleReg<string n> : Register<n> {
9 let Namespace = "Simple";
11 def R0 : SimpleReg<"r0">;
12 def SimpleRegClass : RegisterClass<"Simple",[i32],0,(add R0)>;
13 def SimpleInstrInfo : InstrInfo;
15 def SimpleTarget : Target {
16 let InstructionSet = SimpleInstrInfo;
21 def REL_DEF : InstrMapping {
22 let FilterClass = "SimpleRel";
23 let RowFields = ["BaseName"];
24 let ColFields = ["Col"];
25 let KeyCol = ["KeyCol"];
26 let ValueCols = [["ValCol"]];
29 class INSTR_DEF : Instruction {
30 let Namespace = "Simple";
31 let OutOperandList = (outs);
32 let InOperandList = (ins);
37 def SimpleInstr : SimpleRel, INSTR_DEF;
39 // CHECK: error: No value "BaseName" found in "SimpleInstr" instruction description.
40 // CHECK: def SimpleInstr : SimpleRel, INSTR_DEF;