diff options
Diffstat (limited to 'test/TableGen')
45 files changed, 265 insertions, 31 deletions
diff --git a/test/TableGen/2003-08-03-PassCode.td b/test/TableGen/2003-08-03-PassCode.td index de7d6261b2303..b851a15ffe8b1 100644 --- a/test/TableGen/2003-08-03-PassCode.td +++ b/test/TableGen/2003-08-03-PassCode.td @@ -1,5 +1,4 @@ // RUN: llvm-tblgen %s -// XFAIL: vg_leak class test<code C> { code Code = C; diff --git a/test/TableGen/2006-09-18-LargeInt.td b/test/TableGen/2006-09-18-LargeInt.td index 94cd1ec30710e..5380212367154 100644 --- a/test/TableGen/2006-09-18-LargeInt.td +++ b/test/TableGen/2006-09-18-LargeInt.td @@ -1,4 +1,6 @@ -// RUN: llvm-tblgen %s | grep -- 4294901760 +// RUN: llvm-tblgen %s | FileCheck %s + +// CHECK: 4294901760 def X { int Y = 0xFFFF0000; diff --git a/test/TableGen/2010-03-24-PrematureDefaults.td b/test/TableGen/2010-03-24-PrematureDefaults.td index 716a1d59008ce..24f6c93b3e17c 100644 --- a/test/TableGen/2010-03-24-PrematureDefaults.td +++ b/test/TableGen/2010-03-24-PrematureDefaults.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class A<int k, bits<2> x = 1> { int K = k; diff --git a/test/TableGen/CStyleComment.td b/test/TableGen/CStyleComment.td index 55fb0e787b62e..9c50f7e96f8fa 100644 --- a/test/TableGen/CStyleComment.td +++ b/test/TableGen/CStyleComment.td @@ -1,7 +1,6 @@ // Test that multiline, nested, comments work correctly. // // RUN: llvm-tblgen < %s -// XFAIL: vg_leak /* Foo bar diff --git a/test/TableGen/Dag.td b/test/TableGen/Dag.td index 14d616b521733..fea3aeedde18b 100644 --- a/test/TableGen/Dag.td +++ b/test/TableGen/Dag.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak //===----------------------------------------------------------------------===// // Substitution of an int. diff --git a/test/TableGen/DefmInherit.td b/test/TableGen/DefmInherit.td index b52a709731e1a..bfbb43568b434 100644 --- a/test/TableGen/DefmInherit.td +++ b/test/TableGen/DefmInherit.td @@ -1,4 +1,11 @@ -// RUN: llvm-tblgen %s | grep "zing = 4" | count 4 +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak + +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK-NOT: zing = 4 class C1<int A, string B> { int bar = A; diff --git a/test/TableGen/DefmInsideMultiClass.td b/test/TableGen/DefmInsideMultiClass.td index 0aea21280da0d..d34974de02950 100644 --- a/test/TableGen/DefmInsideMultiClass.td +++ b/test/TableGen/DefmInsideMultiClass.td @@ -1,4 +1,8 @@ -// RUN: llvm-tblgen %s | grep ADDPSrr | count 1 +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak + +// CHECK: ADDPSrr +// CHECK-NOT: ADDPSrr class Instruction<bits<4> opc, string Name> { bits<4> opcode = opc; diff --git a/test/TableGen/ForeachList.td b/test/TableGen/ForeachList.td index 9bc76e0f0cf86..99b7e14c2d5f1 100644 --- a/test/TableGen/ForeachList.td +++ b/test/TableGen/ForeachList.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Register<string name, int idx> { string Name = name; diff --git a/test/TableGen/ForeachLoop.td b/test/TableGen/ForeachLoop.td index a49a60bf26925..4aacc74d8aa2d 100644 --- a/test/TableGen/ForeachLoop.td +++ b/test/TableGen/ForeachLoop.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Register<string name, int idx> { string Name = name; diff --git a/test/TableGen/Include.td b/test/TableGen/Include.td index 8783638f0c61f..1cb779f611a19 100644 --- a/test/TableGen/Include.td +++ b/test/TableGen/Include.td @@ -1,5 +1,5 @@ // RUN: llvm-tblgen -I %p %s -// XFAIL: vg_leak + def BeforeInclude; include "Include.inc" diff --git a/test/TableGen/IntBitInit.td b/test/TableGen/IntBitInit.td index 83713a33321b8..4e150f16833bd 100644 --- a/test/TableGen/IntBitInit.td +++ b/test/TableGen/IntBitInit.td @@ -1,5 +1,5 @@ // RUN: llvm-tblgen %s -// XFAIL: vg_leak + def { bit A = 1; int B = A; diff --git a/test/TableGen/LazyChange.td b/test/TableGen/LazyChange.td index 919a1a7e9a320..2ad6191c25359 100644 --- a/test/TableGen/LazyChange.td +++ b/test/TableGen/LazyChange.td @@ -1,4 +1,6 @@ -// RUN: llvm-tblgen %s | grep "int Y = 3" +// RUN: llvm-tblgen %s | FileCheck %s + +// CHECK: int Y = 3 class C { int X = 4; diff --git a/test/TableGen/LetInsideMultiClasses.td b/test/TableGen/LetInsideMultiClasses.td index 72f48b6d80664..095f37bfb92fa 100644 --- a/test/TableGen/LetInsideMultiClasses.td +++ b/test/TableGen/LetInsideMultiClasses.td @@ -1,4 +1,10 @@ -// RUN: llvm-tblgen %s | grep "bit IsDouble = 1;" | count 3 +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak + +// CHECK: bit IsDouble = 1; +// CHECK: bit IsDouble = 1; +// CHECK: bit IsDouble = 1; +// CHECK-NOT: bit IsDouble = 1; class Instruction<bits<4> opc, string Name> { bits<4> opcode = opc; diff --git a/test/TableGen/ListOfList.td b/test/TableGen/ListOfList.td index adf9fe483eb48..56f964e8685c0 100644 --- a/test/TableGen/ListOfList.td +++ b/test/TableGen/ListOfList.td @@ -1,6 +1,5 @@ -// RUN llvm-tblgen %s | FileCheck %s - -// RUN: llvm-tblgen %s | grep "foo" | count 1 +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Base<string t> { string text = t; @@ -11,3 +10,4 @@ class Derived<list<list<string>> thetext> : Base<thetext[0][0]>; def FOO : Derived<[["foo"]]>; // CHECK: text = "foo" +// CHECK-NOT: text = "foo" diff --git a/test/TableGen/LoLoL.td b/test/TableGen/LoLoL.td index f758e1b604769..778c9609d1a29 100644 --- a/test/TableGen/LoLoL.td +++ b/test/TableGen/LoLoL.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Base<list<int> v> { list<int> values = v; diff --git a/test/TableGen/MultiClass.td b/test/TableGen/MultiClass.td index ef320cf79f164..9c39963458134 100644 --- a/test/TableGen/MultiClass.td +++ b/test/TableGen/MultiClass.td @@ -1,4 +1,9 @@ -// RUN: llvm-tblgen %s | grep "zing = 4" | count 2 +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak + +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK-NOT: zing = 4 class C1<int A, string B> { int bar = A; diff --git a/test/TableGen/MultiClassDefName.td b/test/TableGen/MultiClassDefName.td index 75d6af5b42b96..d3c6de7e84210 100644 --- a/test/TableGen/MultiClassDefName.td +++ b/test/TableGen/MultiClassDefName.td @@ -1,4 +1,8 @@ -// RUN: llvm-tblgen %s | grep WorldHelloCC | count 1 +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak + +// CHECK: WorldHelloCC +// CHECK-NOT: WorldHelloCC class C<string n> { string name = n; diff --git a/test/TableGen/MultiClassInherit.td b/test/TableGen/MultiClassInherit.td index 9d1470a6616b2..04fef2c84995b 100644 --- a/test/TableGen/MultiClassInherit.td +++ b/test/TableGen/MultiClassInherit.td @@ -1,4 +1,36 @@ -// RUN: llvm-tblgen %s | grep "zing = 4" | count 28 +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak + +// "zing = 4" x 28 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK: zing = 4 +// CHECK-NOT: zing = 4 class C1<int A, string B> { int bar = A; diff --git a/test/TableGen/MultiPat.td b/test/TableGen/MultiPat.td index b49b06c24caf1..b3792777b6b5e 100644 --- a/test/TableGen/MultiPat.td +++ b/test/TableGen/MultiPat.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class ValueType<int size, int value> { int Size = size; diff --git a/test/TableGen/NestedForeach.td b/test/TableGen/NestedForeach.td index 5b63175b192ab..e8c16f720d0e8 100644 --- a/test/TableGen/NestedForeach.td +++ b/test/TableGen/NestedForeach.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Droid<string series, int release, string model, int patchlevel> { string Series = series; diff --git a/test/TableGen/Paste.td b/test/TableGen/Paste.td index 33d61ccde1282..a7e2a5b318ba8 100644 --- a/test/TableGen/Paste.td +++ b/test/TableGen/Paste.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Instr<int i> { int index = i; diff --git a/test/TableGen/SetTheory.td b/test/TableGen/SetTheory.td index f26b9e65ac0da..761332312b0ff 100644 --- a/test/TableGen/SetTheory.td +++ b/test/TableGen/SetTheory.td @@ -1,5 +1,6 @@ // Test evaluation of set operations in dags. // RUN: llvm-tblgen -print-sets %s | FileCheck %s +// XFAIL: vg_leak // // The -print-sets driver configures a primitive SetTheory instance that // understands these sets: diff --git a/test/TableGen/SiblingForeach.td b/test/TableGen/SiblingForeach.td index e4c4704a5e394..a11f6f87b4278 100644 --- a/test/TableGen/SiblingForeach.td +++ b/test/TableGen/SiblingForeach.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Set<int i = 0, int j = 0, int k = 0> { int I = i; diff --git a/test/TableGen/Slice.td b/test/TableGen/Slice.td index 7a35d315c5d85..89deaefc9abe1 100644 --- a/test/TableGen/Slice.td +++ b/test/TableGen/Slice.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class ValueType<int size, int value> { int Size = size; diff --git a/test/TableGen/String.td b/test/TableGen/String.td index c71ed50f98607..576ba818f383e 100644 --- a/test/TableGen/String.td +++ b/test/TableGen/String.td @@ -1,5 +1,5 @@ // RUN: llvm-tblgen %s -// XFAIL: vg_leak + class x { string y = "missing terminating '\"' character"; } diff --git a/test/TableGen/TargetInstrSpec.td b/test/TableGen/TargetInstrSpec.td index bf2d257c5d015..32253a3a215c4 100644 --- a/test/TableGen/TargetInstrSpec.td +++ b/test/TableGen/TargetInstrSpec.td @@ -1,5 +1,11 @@ -// RUN: llvm-tblgen %s | grep '\[(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))\]' | count 1 -// RUN: llvm-tblgen %s | grep '\[(set VR128:$dst, (int_x86_sse2_add_ps VR128:$src1, VR128:$src2))\]' | count 1 +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak + +// CHECK: [(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))] +// CHECK-NOT: [(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))] + +// CHECK: [(set VR128:$dst, (int_x86_sse2_add_ps VR128:$src1, VR128:$src2))] +// CHECK-NOT: [(set VR128:$dst, (int_x86_sse2_add_ps VR128:$src1, VR128:$src2))] class ValueType<int size, int value> { int Size = size; diff --git a/test/TableGen/TwoLevelName.td b/test/TableGen/TwoLevelName.td index e88696217f70c..9c502f4755077 100644 --- a/test/TableGen/TwoLevelName.td +++ b/test/TableGen/TwoLevelName.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Type<string name, int length, int width> { string Name = name; diff --git a/test/TableGen/cast.td b/test/TableGen/cast.td index b9e4b375359bf..a8bd207a85a29 100644 --- a/test/TableGen/cast.td +++ b/test/TableGen/cast.td @@ -1,4 +1,10 @@ -// RUN: llvm-tblgen %s | grep "add_ps" | count 3 +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak + +// CHECK: add_ps +// CHECK: add_ps +// CHECK: add_ps +// CHECK-NOT: add_ps class ValueType<int size, int value> { int Size = size; diff --git a/test/TableGen/defmclass.td b/test/TableGen/defmclass.td index 6198c000fddcf..80f03b319426e 100644 --- a/test/TableGen/defmclass.td +++ b/test/TableGen/defmclass.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class XD { bits<4> Prefix = 11; } // CHECK: Prefix = { 1, 1, 0, 0 }; diff --git a/test/TableGen/eq.td b/test/TableGen/eq.td index fc3ad424e2f74..f8daf880b9ede 100644 --- a/test/TableGen/eq.td +++ b/test/TableGen/eq.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak // CHECK: Value = 0 // CHECK: Value = 1 diff --git a/test/TableGen/eqbit.td b/test/TableGen/eqbit.td index b77b1a26dfe15..1d58fa0c19161 100644 --- a/test/TableGen/eqbit.td +++ b/test/TableGen/eqbit.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak // CHECK: a = 6 // CHECK: a = 5 diff --git a/test/TableGen/foreach.td b/test/TableGen/foreach.td index 7b7c199728848..541da49ccde35 100644 --- a/test/TableGen/foreach.td +++ b/test/TableGen/foreach.td @@ -1,6 +1,14 @@ -// RUN: llvm-tblgen %s | grep 'Jr' | count 2 -// RUN: llvm-tblgen %s | grep 'Sr' | count 2 -// RUN: llvm-tblgen %s | grep '"NAME"' | count 1 +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak + +// CHECK: Classes +// CHECK: Sr +// CHECK: Jr +// CHECK: "NAME" + +// CHECK: Defs +// CHECK: Jr +// CHECK: Sr // Variables for foreach class decls { diff --git a/test/TableGen/if.td b/test/TableGen/if.td index e4df74f368607..1d8d62329ae3d 100644 --- a/test/TableGen/if.td +++ b/test/TableGen/if.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak // Support for an `!if' operator as part of a `let' statement. // CHECK: class C diff --git a/test/TableGen/ifbit.td b/test/TableGen/ifbit.td index e3341219ffe8b..88f575e9acfcf 100644 --- a/test/TableGen/ifbit.td +++ b/test/TableGen/ifbit.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak // CHECK: a = 6 // CHECK: a = 5 diff --git a/test/TableGen/intrinsic-order.td b/test/TableGen/intrinsic-order.td new file mode 100644 index 0000000000000..13c2db27e16a3 --- /dev/null +++ b/test/TableGen/intrinsic-order.td @@ -0,0 +1,36 @@ +// RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s +// XFAIL: vg_leak + +class IntrinsicProperty; + +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; + list<IntrinsicProperty> Properties = []; +} + +def iAny : ValueType<0, 254>; +def llvm_anyint_ty : LLVMType<iAny>; + + +// Make sure an intrinsic name that is a prefix of another is checked after the +// other. + +// CHECK: if (NameR.startswith("oo.bar.")) return Intrinsic::foo_bar; +// CHECK: if (NameR.startswith("oo.")) return Intrinsic::foo; + +def int_foo : Intrinsic<"llvm.foo", [llvm_anyint_ty]>; +def int_foo_bar : Intrinsic<"llvm.foo.bar", [llvm_anyint_ty]>; diff --git a/test/TableGen/intrinsic-varargs.td b/test/TableGen/intrinsic-varargs.td new file mode 100644 index 0000000000000..3e48f8da33bf8 --- /dev/null +++ b/test/TableGen/intrinsic-varargs.td @@ -0,0 +1,30 @@ +// RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s +// XFAIL: vg_leak + +class IntrinsicProperty; + +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; + list<IntrinsicProperty> Properties = []; +} + +// isVoid needs to match the definition in ValueTypes.td +def isVoid : ValueType<0, 56>; // Produces no value +def llvm_vararg_ty : LLVMType<isVoid>; // this means vararg here + +// CHECK: /* 0 */ 0, 27, 0, +def int_foo : Intrinsic<"llvm.foo", [llvm_vararg_ty]>; diff --git a/test/TableGen/lisp.td b/test/TableGen/lisp.td index efe00022f51d0..9e586055ff9d6 100644 --- a/test/TableGen/lisp.td +++ b/test/TableGen/lisp.td @@ -1,4 +1,20 @@ -// RUN: llvm-tblgen %s | grep "" +// RUN: llvm-tblgen %s +// XFAIL: vg_leak + +// CHECK: def One { +// CHECK-NEXT: list<string> names = ["Jeffrey Sinclair"]; +// CHECK-NEXT: string element = "Jeffrey Sinclair"; +// CHECK-NEXT: list<string> rest = []; +// CHECK-NEXT: int null = 1; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: def Three { +// CHECK-NEXT: list<string> names = ["Tom", "Dick", "Harry"]; +// CHECK-NEXT: string element = "Tom"; +// CHECK-NEXT: list<string> rest = ["Dick", "Harry"]; +// CHECK-NEXT: int null = 0; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } class List<list<string> n> { list<string> names = n; diff --git a/test/TableGen/list-element-bitref.td b/test/TableGen/list-element-bitref.td index 7db3d31167fd2..4622f28526eb3 100644 --- a/test/TableGen/list-element-bitref.td +++ b/test/TableGen/list-element-bitref.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class C<list<bits<8>> L> { bits<2> V0 = L[0]{1-0}; diff --git a/test/TableGen/math.td b/test/TableGen/math.td index bde267a652dcb..59d16ae908e29 100644 --- a/test/TableGen/math.td +++ b/test/TableGen/math.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Int<int value> { int Value = value; diff --git a/test/TableGen/nested-comment.td b/test/TableGen/nested-comment.td index bf030e77a4b05..f8581ceb2ff5a 100644 --- a/test/TableGen/nested-comment.td +++ b/test/TableGen/nested-comment.td @@ -1,5 +1,4 @@ // RUN: llvm-tblgen < %s -// XFAIL: vg_leak /* foo diff --git a/test/TableGen/pr8330.td b/test/TableGen/pr8330.td index e6720147890b4..7779b635e33cc 100644 --- a/test/TableGen/pr8330.td +++ b/test/TableGen/pr8330.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Or4<bits<8> Val> { bits<8> V = {Val{7}, Val{6}, Val{5}, Val{4}, Val{3}, 1, Val{1}, Val{0} }; diff --git a/test/TableGen/strconcat.td b/test/TableGen/strconcat.td index 0173c49365cce..dfb1a94d82c8b 100644 --- a/test/TableGen/strconcat.td +++ b/test/TableGen/strconcat.td @@ -1,4 +1,6 @@ -// RUN: llvm-tblgen %s | grep fufoo +// RUN: llvm-tblgen %s | FileCheck %s + +// CHECK: fufoo class Y<string S> { string T = !strconcat(S, "foo"); diff --git a/test/TableGen/subst.td b/test/TableGen/subst.td index e265b44cf328a..34818afaa736d 100644 --- a/test/TableGen/subst.td +++ b/test/TableGen/subst.td @@ -1,9 +1,5 @@ -// RUN: llvm-tblgen %s | grep "Smith" | count 7 -// RUN: llvm-tblgen %s | grep "Johnson" | count 2 -// RUN: llvm-tblgen %s | grep "FIRST" | count 1 -// RUN: llvm-tblgen %s | grep "LAST" | count 1 -// RUN: llvm-tblgen %s | grep "TVAR" | count 2 -// RUN: llvm-tblgen %s | grep "Bogus" | count 1 +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Honorific<string t> { string honorific = t; @@ -27,3 +23,56 @@ def JohnSmith : AName<"FIRST LAST", TVAR>; def JaneSmith : AName<"Jane LAST", Ms>; def JohnSmithJones : AName<"FIRST LAST-Jones", Mr>; def JimmyJohnson : AName<"Jimmy Johnson", Mr>; + +// CHECK: ------------- Classes ----------------- +// CHECK-NEXT: class AName<string AName:name = ?, Honorific AName:honorific = ?> { +// CHECK-NEXT: string name = !subst("FIRST", "John", !subst("LAST", "Smith", AName:name)); +// CHECK-NEXT: Honorific honorific = !subst(TVAR, Mr, AName:honorific); +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: class Honorific<string Honorific:t = ?> { +// CHECK-NEXT: string honorific = Honorific:t; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: class Name<string Name:n = ?, Honorific Name:t = ?> { +// CHECK-NEXT: string name = Name:n; +// CHECK-NEXT: Honorific honorific = Name:t; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: ------------- Defs ----------------- +// CHECK-NEXT: def JaneSmith { +// CHECK-NEXT: string name = "Jane Smith"; +// CHECK-NEXT: Honorific honorific = Ms; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: def JimmyJohnson { +// CHECK-NEXT: string name = "Jimmy Johnson"; +// CHECK-NEXT: Honorific honorific = Mr; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: def JohnSmith { +// CHECK-NEXT: string name = "John Smith"; +// CHECK-NEXT: Honorific honorific = Mr; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: def JohnSmithJones { +// CHECK-NEXT: string name = "John Smith-Jones"; +// CHECK-NEXT: Honorific honorific = Mr; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: def Mr +// CHECK-NEXT: string honorific = "Mr."; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: def Mrs { +// CHECK-NEXT: string honorific = "Mrs."; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: def Ms { +// CHECK-NEXT: string honorific = "Ms."; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: def TVAR { +// CHECK-NEXT: string honorific = "Bogus"; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } diff --git a/test/TableGen/subst2.td b/test/TableGen/subst2.td index ce7307703dccd..7c007f7db12ea 100644 --- a/test/TableGen/subst2.td +++ b/test/TableGen/subst2.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak // CHECK: No subst // CHECK: No foo // CHECK: RECURSE foo diff --git a/test/TableGen/usevalname.td b/test/TableGen/usevalname.td index a80ba12869e04..d85b98ac33e64 100644 --- a/test/TableGen/usevalname.td +++ b/test/TableGen/usevalname.td @@ -1,4 +1,5 @@ // RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak class Instr<list<dag> pat> { list<dag> Pattern = pat; |