Remove the code which constant-folded ptrtoint(inttoptr(x)+c) to
[oota-llvm.git] / test / LLVMC / Init.td
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 -fexceptions -x c++ %t
5
6 include "llvm/CompilerDriver/Common.td"
7
8 def OptList : OptionList<[
9 // CHECK: cl::init(true)
10 (switch_option "dummy1", (help "none"), (init true)),
11 // CHECK: cl::init("some-string")
12 (parameter_option "dummy2", (help "none"), (init "some-string"))
13 ]>;
14
15 def dummy_tool : Tool<[
16 (command "dummy_cmd"),
17 (in_language "dummy_lang"),
18 (out_language "dummy_lang"),
19 (actions (case
20          (switch_on "dummy1"), (forward "dummy1"),
21          (not_empty "dummy2"), (forward "dummy2")))
22 ]>;
23
24 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;