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
8 include "llvm/CompilerDriver/Common.td"
10 // CHECK: extern cl::opt<bool> AutoGeneratedSwitch_Wall
12 def OptList : OptionList<[(switch_option "Wall", (extern)),
13 (parameter_option "std", (extern)),
14 (prefix_list_option "L", (extern))]>;
16 def dummy_tool : Tool<[
17 (command "dummy_cmd"),
18 (in_language "dummy"),
19 (out_language "dummy"),
21 (switch_on "Wall"), (stop_compilation),
22 (not_empty "std"), (stop_compilation),
23 (not_empty "L"), (stop_compilation)))
26 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;