intrinsic-varargs.td 784 B

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