From 9703843dfa5640ddfc4362d7aa20b03fba485ece Mon Sep 17 00:00:00 2001 From: David Greene Date: Fri, 3 Sep 2010 21:00:49 +0000 Subject: Generalize getFieldType to work on all TypedInits. Add a couple of testcases from Amaury Pouly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113010 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/TableGen/FieldAccess.td | 14 ++++++++++++++ test/TableGen/ListManip.td | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 test/TableGen/FieldAccess.td create mode 100644 test/TableGen/ListManip.td (limited to 'test/TableGen') diff --git a/test/TableGen/FieldAccess.td b/test/TableGen/FieldAccess.td new file mode 100644 index 0000000000..ad652e79ea --- /dev/null +++ b/test/TableGen/FieldAccess.td @@ -0,0 +1,14 @@ +// RUN: tblgen %s +class Bla +{ + string blu = t; +} + +class Bli +{ + Bla bla = t; +} + +def a : Bli>; +def b : Bla(a.bla).blu>; // works +def c : Bla; // doesn't work: Cannot access field 'blu' of value 'a.bla' diff --git a/test/TableGen/ListManip.td b/test/TableGen/ListManip.td new file mode 100644 index 0000000000..c221bb1335 --- /dev/null +++ b/test/TableGen/ListManip.td @@ -0,0 +1,10 @@ +// RUN: tblgen %s +class Bli +{ + string t = _t; +} + +class Bla _bli> +: Bli +{ +} -- cgit v1.2.3-18-g5258