1 // RUN: llvm-tblgen -gen-searchable-tables -I %p/../../include %s | FileCheck %s
4 include "llvm/TableGen/SearchableTable.td"
6 // CHECK-LABEL: GET_InstrTable_IMPL
7 // CHECK: constexpr MyInstr InstrTable[] = {
18 class MyInstr<int op> : Instruction {
19 Instruction Opcode = !cast<Instruction>(NAME);
20 bits<16> CustomEncoding = op;
30 def InstrTable : GenericTable {
31 let FilterClass = "MyInstr";
32 let Fields = ["Opcode", "CustomEncoding"];
34 let PrimaryKey = ["Opcode"];
35 let PrimaryKeyName = "getCustomEncodingHelper";