remove SectionFlags::Small: it is only used on Xcore, and we'll find
[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 // Empty DAG marker.
50 def empty;
51
52 // The 'case' construct.
53 def case;
54
55 // Boolean constants.
56 def true;
57 def false;
58
59 // Boolean operators.
60 def and;
61 def or;
62
63 // Primitive tests.
64 def switch_on;
65 def parameter_equals;
66 def element_in_list;
67 def input_languages_contain;
68 def not_empty;
69 def default;
70
71 // Possible actions.
72
73 def append_cmd;
74 def forward;
75 def forward_as;
76 def stop_compilation;
77 def unpack_values;
78 def error;
79
80 // Increase/decrease the edge weight.
81 def inc_weight;
82 def dec_weight;
83
84 // Used to specify plugin priority.
85 class PluginPriority<int p> {
86       int priority = p;
87 }
88
89 // Option list - used to specify aliases and sometimes help strings.
90 class OptionList<list<dag> l> {
91       list<dag> options = l;
92 }
93
94 // Map from suffixes to language names
95
96 class LangToSuffixes<string str, list<string> lst> {
97       string lang = str;
98       list<string> suffixes = lst;
99 }
100
101 class LanguageMap<list<LangToSuffixes> lst> {
102       list<LangToSuffixes> map = lst;
103 }
104
105 // Compilation graph
106
107 class EdgeBase<string t1, string t2, dag d> {
108       string a = t1;
109       string b = t2;
110       dag weight = d;
111 }
112
113 class Edge<string t1, string t2> : EdgeBase<t1, t2, (empty)>;
114
115 // Edge and SimpleEdge are synonyms.
116 class SimpleEdge<string t1, string t2> : EdgeBase<t1, t2, (empty)>;
117
118 // Optionally enabled edge.
119 class OptionalEdge<string t1, string t2, dag props> : EdgeBase<t1, t2, props>;
120
121 class CompilationGraph<list<EdgeBase> lst> {
122       list<EdgeBase> edges = lst;
123 }