llvmc: Make syntax more consistent.

CompilationGraph and LanguageMap definitions do not use special syntax anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111862 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mikhail Glushenkov
2010-08-23 23:21:23 +00:00
parent 49d9638075
commit d9a7316f9a
21 changed files with 262 additions and 208 deletions

View File

@@ -96,9 +96,6 @@ def unset_option;
// Increase the edge weight.
def inc_weight;
// Empty DAG marker.
def empty_dag_marker;
// Option list - a single place to specify options.
class OptionList<list<dag> l> {
list<dag> options = l;
@@ -111,31 +108,17 @@ class OptionPreprocessor<dag d> {
// Map from suffixes to language names
class LangToSuffixes<string str, list<string> lst> {
string lang = str;
list<string> suffixes = lst;
}
def lang_to_suffixes;
class LanguageMap<list<LangToSuffixes> lst> {
list<LangToSuffixes> map = lst;
class LanguageMap<list<dag> l> {
list<dag> map = l;
}
// Compilation graph
class EdgeBase<string t1, string t2, dag d> {
string a = t1;
string b = t2;
dag weight = d;
}
class Edge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
// Edge and SimpleEdge are synonyms.
class SimpleEdge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
// Optionally enabled edge.
class OptionalEdge<string t1, string t2, dag props> : EdgeBase<t1, t2, props>;
class CompilationGraph<list<EdgeBase> lst> {
list<EdgeBase> edges = lst;
def edge;
def optional_edge;
class CompilationGraph<list<dag> l> {
list<dag> edges = l;
}