llvm-mc: Parse symbol attribute directives.
[oota-llvm.git] / test / LLVMC / OneOrMore.td
1 // Check that (one_or_more) and (zero_or_one) properties work.
2 // The dummy tool and graph are required to silence warnings.
3 // RUN: tblgen -I $srcroot/include --gen-llvmc %s -o %t
4 // RUN: grep cl::ZeroOrOne %t | count 1
5 // RUN: grep cl::OneOrMore %t | count 1
6
7 include "llvm/CompilerDriver/Common.td"
8
9 def OptList : OptionList<[
10     (prefix_list_option "foo", (one_or_more)),
11     (parameter_list_option "baz", (zero_or_one))]>;
12
13 def dummy_tool : Tool<[
14 (cmd_line "dummy_cmd"),
15 (in_language "dummy"),
16 (out_language "dummy"),
17 (actions (case
18          (not_empty "foo"), (forward_as "foo", "bar"),
19          (not_empty "baz"), (forward "baz")))
20 ]>;
21
22 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;