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
27 // Possible option types
32 def parameter_list_option;
34 def prefix_list_option;
36 // Possible option properties
49 // The 'case' construct.
56 def input_languages_contain;
64 // Increase/decrease the edge weight.
68 // Used to specify plugin priority.
69 class PluginPriority<int p> {
73 // Option list - used to specify aliases and sometimes help strings.
74 class OptionList<list<dag> l> {
75 list<dag> options = l;
78 // Map from suffixes to language names
80 class LangToSuffixes<string str, list<string> lst> {
82 list<string> suffixes = lst;
85 class LanguageMap<list<LangToSuffixes> lst> {
86 list<LangToSuffixes> map = lst;
91 class EdgeBase<string t1, string t2, dag d> {
97 class Edge<string t1, string t2> : EdgeBase<t1, t2, (empty)>;
99 // Edge and SimpleEdge are synonyms.
100 class SimpleEdge<string t1, string t2> : EdgeBase<t1, t2, (empty)>;
102 // Optionally enabled edge.
103 class OptionalEdge<string t1, string t2, dag props> : EdgeBase<t1, t2, props>;
105 class CompilationGraph<list<EdgeBase> lst> {
106 list<EdgeBase> edges = lst;