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: grep {extern .* AutoGeneratedSwitch_Wall} %t
5 // RUN: %compile_cxx -fexceptions -x c++ %t
7 include "llvm/CompilerDriver/Common.td"
9 def OptList : OptionList<[(switch_option "Wall", (extern)),
10 (parameter_option "std", (extern)),
11 (prefix_list_option "L", (extern))]>;
13 def dummy_tool : Tool<[
14 (cmd_line "dummy_cmd $INFILE"),
15 (in_language "dummy"),
16 (out_language "dummy"),
18 (switch_on "Wall"), (stop_compilation),
19 (not_empty "std"), (stop_compilation),
20 (not_empty "L"), (stop_compilation)))
23 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;