More work on edge properties. Use Edge classes instead of strings in CompilationGraph.
[oota-llvm.git] / tools / llvmc2 / Example.td
1 //===- Example.td - LLVMCC toolchain descriptions  ---------*- 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 compilation graph description used by llvmcc.
11 //
12 //===----------------------------------------------------------------------===//
13
14 include "Common.td"
15 include "Tools.td"
16
17 // Toolchains
18
19 def CompilationGraph : CompilationGraph<[
20     Edge<root, llvm_gcc_c>,
21     Edge<root, llvm_gcc_assembler>,
22     Edge<root, llvm_gcc_cpp>,
23     Edge<root, llvm_as>,
24
25     Edge<llvm_gcc_c, llc>,
26     Edge<llvm_gcc_cpp, llc>,
27     Edge<llvm_as, llc>,
28
29     OptionalEdge<llvm_gcc_c, opt, [(switch_on "opt")]>,
30     OptionalEdge<llvm_gcc_cpp, opt, [(switch_on "opt")]>,
31     OptionalEdge<llvm_as, opt, [(switch_on "opt")]>,
32     OptionalEdge<opt, llc, [(switch_on "opt")]>,
33
34     Edge<llc, llvm_gcc_assembler>,
35     Edge<llvm_gcc_assembler, llvm_gcc_linker>
36     ]>;