mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 22:50:47 +00:00
32989deb96
of runs without leak checking. We add -vg to the triple for non-checked runs, or -vg_leak for checked runs. Also use this to XFAIL the TableGen tests, since tablegen leaks like a sieve. This includes some valgrindArgs refactoring. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99103 91177308-0d34-0410-b5e6-96231b3b80d8
31 lines
864 B
TableGen
31 lines
864 B
TableGen
// RUN: tblgen %s | grep {Smith} | count 7
|
|
// RUN: tblgen %s | grep {Johnson} | count 2
|
|
// RUN: tblgen %s | grep {FIRST} | count 1
|
|
// RUN: tblgen %s | grep {LAST} | count 1
|
|
// RUN: tblgen %s | grep {TVAR} | count 2
|
|
// RUN: tblgen %s | grep {Bogus} | count 1
|
|
// XFAIL: vg_leak
|
|
|
|
class Honorific<string t> {
|
|
string honorific = t;
|
|
}
|
|
|
|
def Mr : Honorific<"Mr.">;
|
|
def Ms : Honorific<"Ms.">;
|
|
def Mrs : Honorific<"Mrs.">;
|
|
def TVAR : Honorific<"Bogus">;
|
|
|
|
class Name<string n, Honorific t> {
|
|
string name = n;
|
|
Honorific honorific = t;
|
|
}
|
|
|
|
class AName<string name, Honorific honorific> :
|
|
Name<!subst("FIRST", "John", !subst("LAST", "Smith", name)),
|
|
!subst(TVAR, Mr, honorific)>;
|
|
|
|
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>;
|