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 -Qunused-arguments -fexceptions -x c++ %t
7 include "llvm/CompilerDriver/Common.td"
9 // CHECK: extern cl::opt<bool> AutoGeneratedSwitch_Wall
11 def OptList : OptionList<[(switch_option "Wall", (extern)),
12 (parameter_option "std", (extern)),
13 (prefix_list_option "L", (extern))]>;
15 def dummy_tool : Tool<[
16 (cmd_line "dummy_cmd $INFILE"),
17 (in_language "dummy"),
18 (out_language "dummy"),
20 (switch_on "Wall"), (stop_compilation),
21 (not_empty "std"), (stop_compilation),
22 (not_empty "L"), (stop_compilation)))
25 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;