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 llvmc2 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;
41 // Possible option properties.
51 // The 'case' construct.
62 def input_languages_contain;
74 // Increase/decrease the edge weight.
78 // Used to specify plugin priority.
79 class PluginPriority<int p> {
83 // Option list - used to specify aliases and sometimes help strings.
84 class OptionList<list<dag> l> {
85 list<dag> options = l;
88 // Map from suffixes to language names
90 class LangToSuffixes<string str, list<string> lst> {
92 list<string> suffixes = lst;
95 class LanguageMap<list<LangToSuffixes> lst> {
96 list<LangToSuffixes> map = lst;
101 class EdgeBase<string t1, string t2, dag d> {
107 class Edge<string t1, string t2> : EdgeBase<t1, t2, (empty)>;
109 // Edge and SimpleEdge are synonyms.
110 class SimpleEdge<string t1, string t2> : EdgeBase<t1, t2, (empty)>;
112 // Optionally enabled edge.
113 class OptionalEdge<string t1, string t2, dag props> : EdgeBase<t1, t2, props>;
115 class CompilationGraph<list<EdgeBase> lst> {
116 list<EdgeBase> edges = lst;