blob: 11383cb15baefd98f67b9615664794ffcf877765 [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 Glushenkov0e70fb52008-12-07 16:47:12 +00003// RUN: tblgen -I $srcroot/include --gen-llvmc %s | grep {extern .* AutoGeneratedSwitch_Wall}
Mikhail Glushenkovd652ea02008-12-07 16:41:50 +00004
5include "llvm/CompilerDriver/Common.td"
6
Mikhail Glushenkov0e70fb52008-12-07 16:47:12 +00007def OptList : OptionList<[(switch_option "Wall", (extern)),
8 (parameter_option "std", (extern)),
9 (prefix_list_option "L", (extern))]>;
Mikhail Glushenkovd652ea02008-12-07 16:41:50 +000010
11def dummy_tool : Tool<[
12(cmd_line "dummy_cmd"),
13(in_language "dummy"),
14(out_language "dummy"),
15(actions (case
16 (switch_on "Wall"), (stop_compilation),
17 (not_empty "std"), (stop_compilation),
18 (not_empty "L"), (stop_compilation)))
19]>;
20
21def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;