Support backwards iteration starting from end().
[oota-llvm.git] / include / llvm / CompilerDriver / Common.td
1 //===- Common.td - Common definitions for LLVMC2  ----------*- tablegen -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains common definitions used in llvmc tool description files.
11 //
12 //===----------------------------------------------------------------------===//
13
14 class Tool<list<dag> l> {
15       list<dag> properties = l;
16 }
17
18 // Possible Tool properties.
19
20 def in_language;
21 def out_language;
22 def output_suffix;
23 def command;
24 def out_file_option;
25 def in_file_option;
26 def join;
27 def sink;
28 def works_on_empty;
29 def actions;
30
31 // Possible option types.
32
33 def alias_option;
34 def switch_option;
35 def switch_list_option;
36 def parameter_option;
37 def parameter_list_option;
38 def prefix_option;
39 def prefix_list_option;
40
41 // Possible option properties.
42
43 def help;
44 def hidden;
45 def init;
46 def multi_val;
47 def one_or_more;
48 def zero_or_more;
49 def optional;
50 def really_hidden;
51 def required;
52 def comma_separated;
53 def forward_not_split;
54
55 // The 'case' construct.
56 def case;
57
58 // Boolean constants.
59 def true;
60 def false;
61
62 // Boolean operators.
63 def and;
64 def or;
65 def not;
66
67 // Primitive tests.
68 def switch_on;
69 def parameter_equals;
70 def element_in_list;
71 def input_languages_contain;
72 def empty;
73 def not_empty;
74 def default;
75 def single_input_file;
76 def multiple_input_files;
77 def any_switch_on;
78 def any_not_empty;
79 def any_empty;
80
81 // Possible actions.
82
83 def append_cmd;
84 def forward;
85 def forward_as;
86 def forward_value;
87 def forward_transformed_value;
88 def stop_compilation;
89 def no_out_file;
90 def unpack_values;
91 def warning;
92 def error;
93 def set_option;
94 def unset_option;
95
96 // Increase the edge weight.
97 def inc_weight;
98
99 // Option list - a single place to specify options.
100 class OptionList<list<dag> l> {
101       list<dag> options = l;
102 }
103
104 // Option preprocessor - actions taken during plugin loading.
105 class OptionPreprocessor<dag d> {
106       dag preprocessor = d;
107 }
108
109 // Map from suffixes to language names
110
111 def lang_to_suffixes;
112
113 class LanguageMap<list<dag> l> {
114       list<dag> map = l;
115 }
116
117 // Compilation graph
118
119 def edge;
120 def optional_edge;
121
122 class CompilationGraph<list<dag> l> {
123       list<dag> edges = l;
124 }