Add code to check at SelectionDAGISel::LowerArguments time to see if return values...
[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 cmd_line;
24 def join;
25 def sink;
26 def actions;
27
28 // Possible option types.
29
30 def alias_option;
31 def switch_option;
32 def parameter_option;
33 def parameter_list_option;
34 def prefix_option;
35 def prefix_list_option;
36
37 // Possible option properties.
38
39 def extern;
40 def help;
41 def hidden;
42 def init;
43 def multi_val;
44 def one_or_more;
45 def really_hidden;
46 def required;
47 def zero_or_one;
48
49 // The 'case' construct.
50 def case;
51
52 // Boolean constants.
53 def true;
54 def false;
55
56 // Boolean operators.
57 def and;
58 def or;
59 def not;
60
61 // Primitive tests.
62 def switch_on;
63 def parameter_equals;
64 def element_in_list;
65 def input_languages_contain;
66 def empty;
67 def not_empty;
68 def default;
69 def single_input_file;
70 def multiple_input_files;
71 def any_switch_on;
72 def any_not_empty;
73 def any_empty;
74
75 // Possible actions.
76
77 def append_cmd;
78 def forward;
79 def forward_as;
80 def stop_compilation;
81 def unpack_values;
82 def warning;
83 def error;
84 def unset_option;
85
86 // Increase/decrease the edge weight.
87 def inc_weight;
88 def dec_weight;
89
90 // Empty DAG marker.
91 def empty_dag_marker;
92
93 // Used to specify plugin priority.
94 class PluginPriority<int p> {
95       int priority = p;
96 }
97
98 // Option list - a single place to specify options.
99 class OptionList<list<dag> l> {
100       list<dag> options = l;
101 }
102
103 // Option preprocessor - actions taken during plugin loading.
104 class OptionPreprocessor<dag d> {
105       dag preprocessor = d;
106 }
107
108 // Map from suffixes to language names
109
110 class LangToSuffixes<string str, list<string> lst> {
111       string lang = str;
112       list<string> suffixes = lst;
113 }
114
115 class LanguageMap<list<LangToSuffixes> lst> {
116       list<LangToSuffixes> map = lst;
117 }
118
119 // Compilation graph
120
121 class EdgeBase<string t1, string t2, dag d> {
122       string a = t1;
123       string b = t2;
124       dag weight = d;
125 }
126
127 class Edge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
128
129 // Edge and SimpleEdge are synonyms.
130 class SimpleEdge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
131
132 // Optionally enabled edge.
133 class OptionalEdge<string t1, string t2, dag props> : EdgeBase<t1, t2, props>;
134
135 class CompilationGraph<list<EdgeBase> lst> {
136       list<EdgeBase> edges = lst;
137 }