2013-11-01 01:18:11 +08:00
|
|
|
// RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s
|
2013-11-10 22:26:08 +08:00
|
|
|
// XFAIL: vg_leak
|
2013-11-01 01:18:11 +08:00
|
|
|
|
|
|
|
class IntrinsicProperty;
|
2017-12-21 03:36:28 +08:00
|
|
|
class SDNodeProperty;
|
2013-11-01 01:18:11 +08:00
|
|
|
|
|
|
|
class ValueType<int size, int value> {
|
|
|
|
string Namespace = "MVT";
|
|
|
|
int Size = size;
|
|
|
|
int Value = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
class LLVMType<ValueType vt> {
|
|
|
|
ValueType VT = vt;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Intrinsic<string name, list<LLVMType> param_types = []> {
|
|
|
|
string LLVMName = name;
|
|
|
|
bit isTarget = 0;
|
|
|
|
string TargetPrefix = "";
|
|
|
|
list<LLVMType> RetTypes = [];
|
|
|
|
list<LLVMType> ParamTypes = param_types;
|
2016-02-11 02:40:04 +08:00
|
|
|
list<IntrinsicProperty> IntrProperties = [];
|
2017-12-21 03:36:28 +08:00
|
|
|
list<SDNodeProperty> Properties = [];
|
2013-11-01 01:18:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// isVoid needs to match the definition in ValueTypes.td
|
2017-12-15 03:05:21 +08:00
|
|
|
def isVoid : ValueType<0, 111>; // Produces no value
|
2013-11-01 01:18:11 +08:00
|
|
|
def llvm_vararg_ty : LLVMType<isVoid>; // this means vararg here
|
|
|
|
|
2015-09-02 21:36:25 +08:00
|
|
|
// CHECK: /* 0 */ 0, 29, 0,
|
2013-11-01 01:18:11 +08:00
|
|
|
def int_foo : Intrinsic<"llvm.foo", [llvm_vararg_ty]>;
|