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 %p/../../include --gen-llvmc %s -o %t
4 // RUN: grep cl::ZeroOrOne %t | count 1
5 // RUN: grep cl::OneOrMore %t | count 1
7 include "llvm/CompilerDriver/Common.td"
9 def OptList : OptionList<[
10 (prefix_list_option "foo", (one_or_more)),
11 (parameter_list_option "baz", (zero_or_one))]>;
13 def dummy_tool : Tool<[
14 (cmd_line "dummy_cmd"),
15 (in_language "dummy"),
16 (out_language "dummy"),
18 (not_empty "foo"), (forward_as "foo", "bar"),
19 (not_empty "baz"), (forward "baz")))
22 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;