From PR6228:
[oota-llvm.git] / test / LLVMC / MultiValuedOption.td
1 // Check that multivalued options 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: FileCheck -input-file %t %s
5 // RUN: %compile_cxx -fexceptions -x c++ %t
6
7 include "llvm/CompilerDriver/Common.td"
8
9 def OptList : OptionList<[
10     // CHECK: cl::multi_val(2)
11     (prefix_list_option "foo", (multi_val 2)),
12     (parameter_list_option "baz", (multi_val 2), (extern))]>;
13
14 def dummy_tool : Tool<[
15 (cmd_line "dummy_cmd $INFILE"),
16 (in_language "dummy"),
17 (out_language "dummy"),
18 (actions (case
19          (not_empty "foo"), (forward_as "foo", "bar"),
20          (not_empty "baz"), (forward "baz")))
21 ]>;
22
23 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;