blob: a04a88b002aab378ae841e1d1e5ff3d95aa61632 [file] [log] [blame]
Mikhail Glushenkovd652ea02008-12-07 16:41:50 +00001// Check that extern options work.
2// The dummy tool and graph are required to silence warnings.
Mikhail Glushenkov8139ba32009-01-28 03:47:20 +00003// RUN: tblgen -I $srcroot/include --gen-llvmc %s -o %t
4// RUN: grep {extern .* AutoGeneratedSwitch_Wall} %t
Mikhail Glushenkovd652ea02008-12-07 16:41:50 +00005
6include "llvm/CompilerDriver/Common.td"
7
Mikhail Glushenkov0e70fb52008-12-07 16:47:12 +00008def OptList : OptionList<[(switch_option "Wall", (extern)),
9 (parameter_option "std", (extern)),
10 (prefix_list_option "L", (extern))]>;
Mikhail Glushenkovd652ea02008-12-07 16:41:50 +000011
12def dummy_tool : Tool<[
13(cmd_line "dummy_cmd"),
14(in_language "dummy"),
15(out_language "dummy"),
16(actions (case
17 (switch_on "Wall"), (stop_compilation),
18 (not_empty "std"), (stop_compilation),
19 (not_empty "L"), (stop_compilation)))
20]>;
21
22def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;