Speculatively revert r108429 to fix the clang self-host.
[oota-llvm.git] / test / LLVMC / ExternOptions.td
1 // Check that extern 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 // XFAIL: vg_leak
7
8 include "llvm/CompilerDriver/Common.td"
9
10 // CHECK: extern cl::opt<bool> AutoGeneratedSwitch_Wall
11
12 def OptList : OptionList<[(switch_option "Wall", (extern)),
13                           (parameter_option "std", (extern)),
14                           (prefix_list_option "L", (extern))]>;
15
16 def dummy_tool : Tool<[
17 (command "dummy_cmd"),
18 (in_language "dummy"),
19 (out_language "dummy"),
20 (actions (case
21          (switch_on "Wall"), (stop_compilation),
22          (not_empty "std"), (stop_compilation),
23          (not_empty "L"), (stop_compilation)))
24 ]>;
25
26 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;