From 1434f66b2e132a707e2c8ccb3350ea13fb5aa051 Mon Sep 17 00:00:00 2001 From: David Greene Date: Fri, 7 Jan 2011 17:05:37 +0000 Subject: Rename lisp-like functions as suggested by Gabor Greif as loooong time ago. This is both easier to learn and easier to read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123001 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/TableGen/ListManip.td | 2 +- test/TableGen/Slice.td | 8 ++++---- test/TableGen/if.td | 4 ++-- test/TableGen/lisp.td | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'test/TableGen') diff --git a/test/TableGen/ListManip.td b/test/TableGen/ListManip.td index 55fb5ea..6b1e491 100644 --- a/test/TableGen/ListManip.td +++ b/test/TableGen/ListManip.td @@ -7,6 +7,6 @@ class Bli } class Bla _bli> -: Bli +: Bli { } diff --git a/test/TableGen/Slice.td b/test/TableGen/Slice.td index 22bf7fb..13d9da2 100644 --- a/test/TableGen/Slice.td +++ b/test/TableGen/Slice.td @@ -66,19 +66,19 @@ def not : SDNode; multiclass scalar opcode, string asmstr = "", list> patterns = []> { def SSrr : Inst,patterns[0])>; + !if(!empty(patterns),[],patterns[0])>; def SSrm : Inst,!if(!null(!cdr(patterns)),patterns[0],patterns[1]))>; + !if(!empty(patterns),[],!if(!empty(!tail(patterns)),patterns[0],patterns[1]))>; } multiclass vscalar opcode, string asmstr = "", list> patterns = []> { def V#NAME#SSrr : Inst,patterns[0])>; + !if(!empty(patterns),[],patterns[0])>; def V#NAME#SSrm : Inst,!if(!null(!cdr(patterns)),patterns[0],patterns[1]))>; + !if(!empty(patterns),[],!if(!empty(!tail(patterns)),patterns[0],patterns[1]))>; } multiclass myscalar opcode, string asmstr = "", list> patterns = []> : diff --git a/test/TableGen/if.td b/test/TableGen/if.td index bff9278..c4d953e 100644 --- a/test/TableGen/if.td +++ b/test/TableGen/if.td @@ -28,7 +28,7 @@ class C x, bits<4> y, bit z> { class A> vals> { list first = vals[0]; - list rest = !if(!null(!cdr(vals)), vals[0], vals[1]); + list rest = !if(!empty(!tail(vals)), vals[0], vals[1]); } def One : A<[[1,2,3]]>; @@ -38,7 +38,7 @@ class B v> { list vals = v; } -class BB> vals> : B; +class BB> vals> : B; class BBB> vals> : BB; def OneB : BBB<[[1,2,3]]>; diff --git a/test/TableGen/lisp.td b/test/TableGen/lisp.td index b521e04..bbed869 100644 --- a/test/TableGen/lisp.td +++ b/test/TableGen/lisp.td @@ -15,7 +15,7 @@ class CDR r, int n> { } class NameList Names> : - List, CAR, CDR; + List, CAR, CDR; def Three : NameList<["Tom", "Dick", "Harry"]>; -- cgit v1.1