X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FTableGen%2Fsubst.td;h=34818afaa736d4f00d72ff9fe545a068cb6b4c4b;hb=00552e3875ee5f382db6c98286a241a7d0efe1b8;hp=5a73ec4f129462539f21747b81b12c7cac05aac7;hpb=5d5c0624d0f5b9d89a6ad9cbc9fc96b0408ec033;p=oota-llvm.git diff --git a/test/TableGen/subst.td b/test/TableGen/subst.td index 5a73ec4f129..34818afaa73 100644 --- a/test/TableGen/subst.td +++ b/test/TableGen/subst.td @@ -1,9 +1,4 @@ -// 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 { @@ -28,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 { +// 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 { +// CHECK-NEXT: string honorific = Honorific:t; +// CHECK-NEXT: string NAME = ?; +// CHECK-NEXT: } +// CHECK-NEXT: class Name { +// 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: }