1// RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s
2// XFAIL: vg_leak
3
4class IntrinsicProperty;
5
6class ValueType<int size, int value> {
7  string Namespace = "MVT";
8  int Size = size;
9  int Value = value;
10}
11
12class LLVMType<ValueType vt> {
13  ValueType VT = vt;
14}
15
16class 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> Properties = [];
23}
24
25// isVoid needs to match the definition in ValueTypes.td
26def isVoid : ValueType<0, 56>;   // Produces no value
27def llvm_vararg_ty : LLVMType<isVoid>;   // this means vararg here
28
29// CHECK: /* 0 */ 0, 28, 0,
30def int_foo : Intrinsic<"llvm.foo", [llvm_vararg_ty]>;
31