diff options
author | Chris Lattner <sabre@nondot.org> | 2006-09-01 21:14:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-09-01 21:14:37 +0000 |
commit | ef4e0c2827255f8e1de09d60a32feff9bf64fb8d (patch) | |
tree | 99428af6b569049c5e6a6908060779af929e7dea | |
parent | 12069866c8dcfb8e0aaef4d99817eb14967659e9 (diff) |
simple multiclass example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30028 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/TableGen/MultiClass.td | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/TableGen/MultiClass.td b/test/TableGen/MultiClass.td new file mode 100644 index 0000000000..7e117d526a --- /dev/null +++ b/test/TableGen/MultiClass.td @@ -0,0 +1,17 @@ +// RUN: tblgen %s +class C1<int A, string B> { + int bar = A; + string thestr = B; +} + +def T : C1<4, "blah">; + +multiclass t<int a> { + def S1 : C1<a, "foo"> { + int foo = 4; + let bar = 1; + } + def S2 : C1<a, "bar">; +} + +defm FOO : t<42>; |