1 //===- Tools.td - Common definitions for LLVMCC -----------*- 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 llvmcc tool description files.
12 //===----------------------------------------------------------------------===//
14 class Tool<list<dag> l> {
15 list<dag> properties = l;
18 // Special Tool instance - graph root.
22 // Possible Tool properties
31 // Possible option types
35 def parameter_list_option;
37 def prefix_list_option;
39 // Possible option properties
48 // Possible edge properties
53 def if_input_languages_contain;
55 // Edge property combinators.
60 // Map from suffixes to language names
62 class LangToSuffixes<string str, list<string> lst> {
64 list<string> suffixes = lst;
67 class LanguageMap<list<LangToSuffixes> lst> {
68 list<LangToSuffixes> map = lst;
73 class EdgeBase<Tool t1, Tool t2, list<dag> lst> {
76 list<dag> props = lst;
79 class Edge<Tool t1, Tool t2> : EdgeBase<t1, t2, []>;
81 // Edge and SimpleEdge are synonyms.
82 class SimpleEdge<Tool t1, Tool t2> : EdgeBase<t1, t2, []>;
84 // Optionally enabled edge.
85 class OptionalEdge<Tool t1, Tool t2, list<dag> lst> : EdgeBase<t1, t2, lst>;
87 class CompilationGraph<list<EdgeBase> lst> {
88 list<EdgeBase> edges = lst;