29f61a4c0cfc5d4030a04971dc99bacf79c83d66
[oota-llvm.git] / test / LLVMC / ForwardValue.td
1 // Check that forward_value works.
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 {vec.push_back\(AutoGeneratedParameter_a\)} %t
5 // RUN: grep {std::copy\(AutoGeneratedList_b.begin\(\)} %t
6 // RUN: %compile_cxx -fexceptions -x c++ %t
7
8 include "llvm/CompilerDriver/Common.td"
9
10 def OptList : OptionList<[(parameter_option "a", (extern)),
11                           (prefix_list_option "b", (extern))]>;
12
13 def dummy_tool : Tool<[
14 (cmd_line "dummy_cmd $INFILE"),
15 (in_language "dummy"),
16 (out_language "dummy"),
17 (actions (case
18          (not_empty "a"), (forward_value "a"),
19          (not_empty "b"), (forward_value "b")))
20 ]>;
21
22 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;