1 // Check that (init true/false) and (init "str") work.
2 // RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
3 // RUN: grep cl::init(\\"some-string\\") %t | count 1
4 // RUN: grep cl::init(true) %t | count 1
5 // RUN: %compile_cxx -fexceptions -x c++ %t
7 include "llvm/CompilerDriver/Common.td"
9 def OptList : OptionList<[
10 (switch_option "dummy1", (help "none"), (init true)),
11 (parameter_option "dummy2", (help "none"), (init "some-string"))
14 def dummy_tool : Tool<[
15 (cmd_line "dummy_cmd $INFILE"),
16 (in_language "dummy_lang"),
17 (out_language "dummy_lang"),
19 (switch_on "dummy1"), (forward "dummy1"),
20 (not_empty "dummy2"), (forward "dummy2")))
23 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;