Mikhail Glushenkov | 15dcc2a | 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 | 19d3e82 | 2009-01-28 03:47:20 +0000 | [diff] [blame] | 3 | // RUN: tblgen -I $srcroot/include --gen-llvmc %s -o %t |
| 4 | // RUN: grep {extern .* AutoGeneratedSwitch_Wall} %t |
Mikhail Glushenkov | 15dcc2a | 2008-12-07 16:41:50 +0000 | [diff] [blame] | 5 | |
| 6 | include "llvm/CompilerDriver/Common.td" |
| 7 | |
Mikhail Glushenkov | b4ced5a | 2008-12-07 16:47:12 +0000 | [diff] [blame] | 8 | def OptList : OptionList<[(switch_option "Wall", (extern)), |
| 9 | (parameter_option "std", (extern)), |
| 10 | (prefix_list_option "L", (extern))]>; |
Mikhail Glushenkov | 15dcc2a | 2008-12-07 16:41:50 +0000 | [diff] [blame] | 11 | |
| 12 | def 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 | |
| 22 | def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>; |