1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
llvm-mirror/test/TableGen/subst2.td
David Greene 3bfe36b5d9 Fix a bug in !subst where TableGen would go and resubstitute text it had
just substituted.  This could cause infinite looping in certain
pathological cases.

llvm-svn: 91843
2009-12-21 21:21:34 +00:00

16 lines
344 B
TableGen

// RUN: tblgen %s | FileCheck %s
// CHECK: No subst
// CHECK: No foo
// CHECK: RECURSE foo
class Recurse<string t> {
string Text = t;
}
class Text<string text> :
Recurse<!subst("RECURSE", "RECURSE", !subst("NORECURSE", "foo", text))>;
def Ok1 : Text<"No subst">;
def Ok2 : Text<"No NORECURSE">;
def Trouble : Text<"RECURSE NORECURSE">;