1 //===- Common.td - Common definitions for LLVMC2 ----------*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains common definitions used in llvmc tool description files.
12 //===----------------------------------------------------------------------===//
14 class Tool<list<dag> l> {
15 list<dag> properties = l;
18 // Possible Tool properties.
28 // Possible option types.
33 def parameter_list_option;
35 def prefix_list_option;
37 // Possible option properties.
49 // The 'case' construct.
65 def input_languages_contain;
69 def single_input_file;
70 def multiple_input_files;
86 // Increase/decrease the edge weight.
93 // Used to specify plugin priority.
94 class PluginPriority<int p> {
98 // Option list - a single place to specify options.
99 class OptionList<list<dag> l> {
100 list<dag> options = l;
103 // Option preprocessor - actions taken during plugin loading.
104 class OptionPreprocessor<dag d> {
105 dag preprocessor = d;
108 // Map from suffixes to language names
110 class LangToSuffixes<string str, list<string> lst> {
112 list<string> suffixes = lst;
115 class LanguageMap<list<LangToSuffixes> lst> {
116 list<LangToSuffixes> map = lst;
121 class EdgeBase<string t1, string t2, dag d> {
127 class Edge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
129 // Edge and SimpleEdge are synonyms.
130 class SimpleEdge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
132 // Optionally enabled edge.
133 class OptionalEdge<string t1, string t2, dag props> : EdgeBase<t1, t2, props>;
135 class CompilationGraph<list<EdgeBase> lst> {
136 list<EdgeBase> edges = lst;