Heuristic: If the number of operands in the alias are more than the number of
[llvm/stm8.git] / test / LLVMC / Init.td
blobc3846797026e4c2bc961416e9e9df747927b62a5
1 // Check that (init true/false) and (init "str") work.
2 // RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
3 // RUN: FileCheck -input-file %t %s
4 // RUN: %compile_cxx %t
5 // XFAIL: vg_leak
7 include "llvm/CompilerDriver/Common.td"
9 def OptList : OptionList<[
10 // CHECK: cl::init(true)
11 (switch_option "dummy1", (help "none"), (init true)),
12 // CHECK: cl::init("some-string")
13 (parameter_option "dummy2", (help "none"), (init "some-string"))
14 ]>;
16 def dummy_tool : Tool<[
17 (command "dummy_cmd"),
18 (in_language "dummy_lang"),
19 (out_language "dummy_lang"),
20 (actions (case
21          (switch_on "dummy1"), (forward "dummy1"),
22          (not_empty "dummy2"), (forward "dummy2")))
23 ]>;
25 def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;