llvmc: remove dynamic plugins.
[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/decrease the edge weight.
97 def inc_weight;
98 def dec_weight;
99
100 // Empty DAG marker.
101 def empty_dag_marker;
102
103 // Option list - a single place to specify options.
104 class OptionList<list<dag> l> {
105       list<dag> options = l;
106 }
107
108 // Option preprocessor - actions taken during plugin loading.
109 class OptionPreprocessor<dag d> {
110       dag preprocessor = d;
111 }
112
113 // Map from suffixes to language names
114
115 class LangToSuffixes<string str, list<string> lst> {
116       string lang = str;
117       list<string> suffixes = lst;
118 }
119
120 class LanguageMap<list<LangToSuffixes> lst> {
121       list<LangToSuffixes> map = lst;
122 }
123
124 // Compilation graph
125
126 class EdgeBase<string t1, string t2, dag d> {
127       string a = t1;
128       string b = t2;
129       dag weight = d;
130 }
131
132 class Edge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
133
134 // Edge and SimpleEdge are synonyms.
135 class SimpleEdge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
136
137 // Optionally enabled edge.
138 class OptionalEdge<string t1, string t2, dag props> : EdgeBase<t1, t2, props>;
139
140 class CompilationGraph<list<EdgeBase> lst> {
141       list<EdgeBase> edges = lst;
142 }