Mikhail Glushenkov | d652ea0 | 2008-12-07 16:41:50 +0000 | [diff] [blame] | 1 | // Check that extern options work. |
| 2 | // The dummy tool and graph are required to silence warnings. |
Mikhail Glushenkov | 0e70fb5 | 2008-12-07 16:47:12 +0000 | [diff] [blame^] | 3 | // RUN: tblgen -I $srcroot/include --gen-llvmc %s | grep {extern .* AutoGeneratedSwitch_Wall} |
Mikhail Glushenkov | d652ea0 | 2008-12-07 16:41:50 +0000 | [diff] [blame] | 4 | |
| 5 | include "llvm/CompilerDriver/Common.td" |
| 6 | |
Mikhail Glushenkov | 0e70fb5 | 2008-12-07 16:47:12 +0000 | [diff] [blame^] | 7 | def OptList : OptionList<[(switch_option "Wall", (extern)), |
| 8 | (parameter_option "std", (extern)), |
| 9 | (prefix_list_option "L", (extern))]>; |
Mikhail Glushenkov | d652ea0 | 2008-12-07 16:41:50 +0000 | [diff] [blame] | 10 | |
| 11 | def 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 | |
| 21 | def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>; |