1 // RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s 2 // XFAIL: vg_leak 3 4 class IntrinsicProperty; 5 6 class ValueType<int size, int value> { 7 string Namespace = "MVT"; 8 int Size = size; 9 int Value = value; 10 } 11 12 class LLVMType<ValueType vt> { 13 ValueType VT = vt; 14 } 15 16 class Intrinsic<string name, list<LLVMType> param_types = []> { 17 string LLVMName = name; 18 bit isTarget = 0; 19 string TargetPrefix = ""; 20 list<LLVMType> RetTypes = []; 21 list<LLVMType> ParamTypes = param_types; 22 list<IntrinsicProperty> IntrProperties = []; 23 } 24 25 // isVoid needs to match the definition in ValueTypes.td 26 def isVoid : ValueType<0, 66>; // Produces no value 27 def llvm_vararg_ty : LLVMType<isVoid>; // this means vararg here 28 29 // CHECK: /* 0 */ 0, 29, 0, 30 def int_foo : Intrinsic<"llvm.foo", [llvm_vararg_ty]>; 31