diff options
author | David Greene <greened@obbligato.org> | 2010-09-03 21:00:49 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2010-09-03 21:00:49 +0000 |
commit | 9703843dfa5640ddfc4362d7aa20b03fba485ece (patch) | |
tree | 3c8f21c0b9e558fa2fbf3193b9db5063935d1f8a /test/TableGen | |
parent | 190d0a54c18e0f8198b5b802818f7194b91262b4 (diff) |
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
Diffstat (limited to 'test/TableGen')
-rw-r--r-- | test/TableGen/FieldAccess.td | 14 | ||||
-rw-r--r-- | test/TableGen/ListManip.td | 10 |
2 files changed, 24 insertions, 0 deletions
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 t> +{ + string blu = t; +} + +class Bli<Bla t> +{ + Bla bla = t; +} + +def a : Bli<Bla<"">>; +def b : Bla<!cast<Bla>(a.bla).blu>; // works +def c : Bla<a.bla.blu>; // 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> +{ + string t = _t; +} + +class Bla<list<Bli> _bli> +: Bli<!car(_bli).t> +{ +} |