]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/llvm/include/llvm/CompilerDriver/Common.td
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
[FreeBSD/stable/9.git] / contrib / llvm / 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 class Bool<bit val> {
60       bit Value = val;
61 }
62 def true : Bool<1>;
63 def false : Bool<0>;
64
65 // Boolean operators.
66 def and;
67 def or;
68 def not;
69
70 // Primitive tests.
71 def switch_on;
72 def parameter_equals;
73 def element_in_list;
74 def input_languages_contain;
75 def empty;
76 def not_empty;
77 def default;
78 def single_input_file;
79 def multiple_input_files;
80 def any_switch_on;
81 def any_not_empty;
82 def any_empty;
83
84 // Possible actions.
85
86 def append_cmd;
87 def forward;
88 def forward_as;
89 def forward_value;
90 def forward_transformed_value;
91 def stop_compilation;
92 def no_out_file;
93 def unpack_values;
94 def warning;
95 def error;
96 def set_option;
97 def unset_option;
98
99 // Increase the edge weight.
100 def inc_weight;
101
102 // Option list - a single place to specify options.
103 class OptionList<list<dag> l> {
104       list<dag> options = l;
105 }
106
107 // Option preprocessor - actions taken during plugin loading.
108 class OptionPreprocessor<dag d> {
109       dag preprocessor = d;
110 }
111
112 // Map from suffixes to language names
113
114 def lang_to_suffixes;
115
116 class LanguageMap<list<dag> l> {
117       list<dag> map = l;
118 }
119
120 // Compilation graph
121
122 def edge;
123 def optional_edge;
124
125 class CompilationGraph<list<dag> l> {
126       list<dag> edges = l;
127 }