Anton Korobeynikov | e9ffb5b | 2008-03-23 08:57:20 +0000 | [diff] [blame] | 1 | //===- Tools.td - Common definitions for LLVMCC -----------*- 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 common definitions used in llvmcc tool description files. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | class Tool<list<dag> l> { |
| 15 | list<dag> properties = l; |
| 16 | } |
| 17 | |
| 18 | // Possible Tool properties |
| 19 | |
| 20 | def in_language; |
| 21 | def out_language; |
| 22 | def output_suffix; |
| 23 | def cmd_line; |
| 24 | def join; |
| 25 | def sink; |
| 26 | |
| 27 | // Possible option types |
| 28 | |
| 29 | def switch_option; |
| 30 | def parameter_option; |
| 31 | def parameter_list_option; |
| 32 | def prefix_option; |
| 33 | def prefix_list_option; |
| 34 | |
| 35 | // Possible option properties |
| 36 | |
| 37 | def append_cmd; |
| 38 | def forward; |
| 39 | def stop_compilation; |
| 40 | def unpack_values; |
| 41 | def help; |
| 42 | def required; |
| 43 | |
| 44 | // Map from suffixes to language names |
| 45 | |
| 46 | class LangToSuffixes<string str, list<string> lst> { |
| 47 | string lang = str; |
| 48 | list<string> suffixes = lst; |
| 49 | } |
| 50 | |
| 51 | class LanguageMap<list<LangToSuffixes> lst> { |
| 52 | list<LangToSuffixes> map = lst; |
| 53 | } |
| 54 | |
| 55 | // Toolchain classes |
| 56 | |
| 57 | class ToolChain <list<Tool> lst> { |
| 58 | list <Tool> tools = lst; |
| 59 | } |
| 60 | |
| 61 | class ToolChains <list<ToolChain> lst> { |
| 62 | list<ToolChain> chains = lst; |
| 63 | } |