mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
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:
1 parent
49d9638075
commit
d9a7316f9a
21 files changed
+261
-207
No files matched your search
@@ -36,6 +36,6 @@ def gcc : Tool<
|
||||
(out_file_option "-o")
|
||||
]>;
|
||||
|
||||
def LanguageMap : LanguageMap<[LangToSuffixes<"c", ["c"]>]>;
|
||||
def LanguageMap : LanguageMap<[(lang_to_suffixes "c", "c")]>;
|
||||
|
||||
def CompilationGraph : CompilationGraph<[Edge<"root", "gcc">]>;
|
||||
def CompilationGraph : CompilationGraph<[(edge "root", "gcc")]>;
|
||||
@@ -202,33 +202,33 @@ def mplink : Tool<[
|
||||
// Language map
|
||||
|
||||
def LanguageMap : LanguageMap<[
|
||||
LangToSuffixes<"c", ["c"]>,
|
||||
LangToSuffixes<"c-cpp-output", ["i"]>,
|
||||
LangToSuffixes<"assembler", ["s"]>,
|
||||
LangToSuffixes<"assembler-with-cpp", ["S"]>,
|
||||
LangToSuffixes<"llvm-assembler", ["ll"]>,
|
||||
LangToSuffixes<"llvm-bitcode", ["bc"]>,
|
||||
LangToSuffixes<"object-code", ["o"]>,
|
||||
LangToSuffixes<"executable", ["cof"]>
|
||||
(lang_to_suffixes "c", "c"),
|
||||
(lang_to_suffixes "c-cpp-output", "i"),
|
||||
(lang_to_suffixes "assembler", "s"),
|
||||
(lang_to_suffixes "assembler-with-cpp", "S"),
|
||||
(lang_to_suffixes "llvm-assembler", "ll"),
|
||||
(lang_to_suffixes "llvm-bitcode", "bc"),
|
||||
(lang_to_suffixes "object-code", "o"),
|
||||
(lang_to_suffixes "executable", "cof")
|
||||
]>;
|
||||
|
||||
// Compilation graph
|
||||
|
||||
def CompilationGraph : CompilationGraph<[
|
||||
Edge<"root", "clang_cc">,
|
||||
Edge<"root", "llvm_ld">,
|
||||
OptionalEdge<"root", "llvm_ld_optimizer", (case
|
||||
(switch_on "S"), (inc_weight),
|
||||
(switch_on "c"), (inc_weight))>,
|
||||
Edge<"root", "gpasm">,
|
||||
Edge<"root", "mplink">,
|
||||
Edge<"clang_cc", "llvm_ld">,
|
||||
OptionalEdge<"clang_cc", "llvm_ld_optimizer", (case
|
||||
(switch_on "S"), (inc_weight),
|
||||
(switch_on "c"), (inc_weight))>,
|
||||
Edge<"llvm_ld", "pic16passes">,
|
||||
Edge<"llvm_ld_optimizer", "pic16passes">,
|
||||
Edge<"pic16passes", "llc">,
|
||||
Edge<"llc", "gpasm">,
|
||||
Edge<"gpasm", "mplink">
|
||||
(edge "root", "clang_cc"),
|
||||
(edge "root", "llvm_ld"),
|
||||
(optional_edge "root", "llvm_ld_optimizer",
|
||||
(case (switch_on "S"), (inc_weight),
|
||||
(switch_on "c"), (inc_weight))),
|
||||
(edge "root", "gpasm"),
|
||||
(edge "root", "mplink"),
|
||||
(edge "clang_cc", "llvm_ld"),
|
||||
(optional_edge "clang_cc", "llvm_ld_optimizer",
|
||||
(case (switch_on "S"), (inc_weight),
|
||||
(switch_on "c"), (inc_weight))),
|
||||
(edge "llvm_ld", "pic16passes"),
|
||||
(edge "llvm_ld_optimizer", "pic16passes"),
|
||||
(edge "pic16passes", "llc"),
|
||||
(edge "llc", "gpasm"),
|
||||
(edge "gpasm", "mplink")
|
||||
]>;
|
||||
+55
-50
@@ -304,73 +304,78 @@ def llvm_gcc_cpp_linker : llvm_gcc_based_linker<"@LLVMGXXCOMMAND@",
|
||||
|
||||
// Language map
|
||||
|
||||
def LanguageMap : LanguageMap<
|
||||
[LangToSuffixes<"c++", ["cc", "cp", "cxx", "cpp", "CPP", "c++", "C"]>,
|
||||
LangToSuffixes<"c++-header", ["hpp"]>,
|
||||
LangToSuffixes<"c", ["c"]>,
|
||||
LangToSuffixes<"c-header", ["h"]>,
|
||||
LangToSuffixes<"c-cpp-output", ["i"]>,
|
||||
LangToSuffixes<"objective-c-cpp-output", ["mi"]>,
|
||||
LangToSuffixes<"objective-c++", ["mm"]>,
|
||||
LangToSuffixes<"objective-c++-header", ["hmm"]>,
|
||||
LangToSuffixes<"objective-c", ["m"]>,
|
||||
LangToSuffixes<"objective-c-header", ["hm"]>,
|
||||
LangToSuffixes<"assembler", ["s"]>,
|
||||
LangToSuffixes<"assembler-with-cpp", ["S"]>,
|
||||
LangToSuffixes<"llvm-assembler", ["ll"]>,
|
||||
LangToSuffixes<"llvm-bitcode", ["bc"]>,
|
||||
LangToSuffixes<"object-code", ["o", "*empty*"]>,
|
||||
LangToSuffixes<"static-library", ["a", "lib"]>,
|
||||
LangToSuffixes<"executable", ["out"]>
|
||||
]>;
|
||||
def LanguageMap : LanguageMap<[
|
||||
(lang_to_suffixes "c++", ["cc", "cp", "cxx", "cpp", "CPP", "c++", "C"]),
|
||||
(lang_to_suffixes "c++-header", "hpp"),
|
||||
(lang_to_suffixes "c", "c"),
|
||||
(lang_to_suffixes "c-header", "h"),
|
||||
(lang_to_suffixes "c-cpp-output", "i"),
|
||||
(lang_to_suffixes "objective-c-cpp-output", "mi"),
|
||||
(lang_to_suffixes "objective-c++", "mm"),
|
||||
(lang_to_suffixes "objective-c++-header", "hmm"),
|
||||
(lang_to_suffixes "objective-c", "m"),
|
||||
(lang_to_suffixes "objective-c-header", "hm"),
|
||||
(lang_to_suffixes "assembler", "s"),
|
||||
(lang_to_suffixes "assembler-with-cpp", "S"),
|
||||
(lang_to_suffixes "llvm-assembler", "ll"),
|
||||
(lang_to_suffixes "llvm-bitcode", "bc"),
|
||||
(lang_to_suffixes "object-code", ["o", "*empty*"]),
|
||||
(lang_to_suffixes "static-library", ["a", "lib"]),
|
||||
(lang_to_suffixes "executable", ["out"])
|
||||
]>;
|
||||
|
||||
// Compilation graph
|
||||
|
||||
def CompilationGraph : CompilationGraph<[
|
||||
Edge<"root", "llvm_gcc_c">,
|
||||
Edge<"root", "llvm_gcc_assembler">,
|
||||
Edge<"root", "llvm_gcc_cpp">,
|
||||
Edge<"root", "llvm_gcc_m">,
|
||||
Edge<"root", "llvm_gcc_mxx">,
|
||||
Edge<"root", "llc">,
|
||||
(edge "root", "llvm_gcc_c"),
|
||||
(edge "root", "llvm_gcc_assembler"),
|
||||
(edge "root", "llvm_gcc_cpp"),
|
||||
(edge "root", "llvm_gcc_m"),
|
||||
(edge "root", "llvm_gcc_mxx"),
|
||||
(edge "root", "llc"),
|
||||
|
||||
Edge<"root", "llvm_gcc_c_pch">,
|
||||
Edge<"root", "llvm_gcc_cpp_pch">,
|
||||
Edge<"root", "llvm_gcc_m_pch">,
|
||||
Edge<"root", "llvm_gcc_mxx_pch">,
|
||||
(edge "root", "llvm_gcc_c_pch"),
|
||||
(edge "root", "llvm_gcc_cpp_pch"),
|
||||
(edge "root", "llvm_gcc_m_pch"),
|
||||
(edge "root", "llvm_gcc_mxx_pch"),
|
||||
|
||||
Edge<"llvm_gcc_c", "llc">,
|
||||
Edge<"llvm_gcc_cpp", "llc">,
|
||||
Edge<"llvm_gcc_m", "llc">,
|
||||
Edge<"llvm_gcc_mxx", "llc">,
|
||||
Edge<"llvm_as", "llc">,
|
||||
(edge "llvm_gcc_c", "llc"),
|
||||
(edge "llvm_gcc_cpp", "llc"),
|
||||
(edge "llvm_gcc_m", "llc"),
|
||||
(edge "llvm_gcc_mxx", "llc"),
|
||||
(edge "llvm_as", "llc"),
|
||||
|
||||
OptionalEdge<"root", "llvm_as",
|
||||
(case (switch_on "emit-llvm"), (inc_weight))>,
|
||||
OptionalEdge<"llvm_gcc_c", "opt", (case (switch_on "opt"), (inc_weight))>,
|
||||
OptionalEdge<"llvm_gcc_cpp", "opt", (case (switch_on "opt"), (inc_weight))>,
|
||||
OptionalEdge<"llvm_gcc_m", "opt", (case (switch_on "opt"), (inc_weight))>,
|
||||
OptionalEdge<"llvm_gcc_mxx", "opt", (case (switch_on "opt"), (inc_weight))>,
|
||||
OptionalEdge<"llvm_as", "opt", (case (switch_on "opt"), (inc_weight))>,
|
||||
Edge<"opt", "llc">,
|
||||
(optional_edge "root", "llvm_as",
|
||||
(case (switch_on "emit-llvm"), (inc_weight))),
|
||||
(optional_edge "llvm_gcc_c", "opt",
|
||||
(case (switch_on "opt"), (inc_weight))),
|
||||
(optional_edge "llvm_gcc_cpp", "opt",
|
||||
(case (switch_on "opt"), (inc_weight))),
|
||||
(optional_edge "llvm_gcc_m", "opt",
|
||||
(case (switch_on "opt"), (inc_weight))),
|
||||
(optional_edge "llvm_gcc_mxx", "opt",
|
||||
(case (switch_on "opt"), (inc_weight))),
|
||||
(optional_edge "llvm_as", "opt",
|
||||
(case (switch_on "opt"), (inc_weight))),
|
||||
(edge "opt", "llc"),
|
||||
|
||||
Edge<"llc", "llvm_gcc_assembler">,
|
||||
Edge<"llvm_gcc_assembler", "llvm_gcc_linker">,
|
||||
OptionalEdge<"llvm_gcc_assembler", "llvm_gcc_cpp_linker",
|
||||
(edge "llc", "llvm_gcc_assembler"),
|
||||
(edge "llvm_gcc_assembler", "llvm_gcc_linker"),
|
||||
(optional_edge "llvm_gcc_assembler", "llvm_gcc_cpp_linker",
|
||||
(case
|
||||
(or (input_languages_contain "c++"),
|
||||
(input_languages_contain "objective-c++")),
|
||||
(inc_weight),
|
||||
(or (parameter_equals "linker", "g++"),
|
||||
(parameter_equals "linker", "c++")), (inc_weight))>,
|
||||
(parameter_equals "linker", "c++")), (inc_weight))),
|
||||
|
||||
|
||||
Edge<"root", "llvm_gcc_linker">,
|
||||
OptionalEdge<"root", "llvm_gcc_cpp_linker",
|
||||
(edge "root", "llvm_gcc_linker"),
|
||||
(optional_edge "root", "llvm_gcc_cpp_linker",
|
||||
(case
|
||||
(or (input_languages_contain "c++"),
|
||||
(input_languages_contain "objective-c++")),
|
||||
(inc_weight),
|
||||
(or (parameter_equals "linker", "g++"),
|
||||
(parameter_equals "linker", "c++")), (inc_weight))>
|
||||
]>;
|
||||
(parameter_equals "linker", "c++")), (inc_weight)))
|
||||
]>;
|
||||
+14
-14
@@ -70,18 +70,18 @@ def llvm_ld : Tool<
|
||||
// Compilation graph
|
||||
|
||||
def ClangCompilationGraph : CompilationGraph<[
|
||||
OptionalEdge<"root", "clang_c",
|
||||
(case (switch_on "clang"), (inc_weight))>,
|
||||
OptionalEdge<"root", "clang_cpp",
|
||||
(case (switch_on "clang"), (inc_weight))>,
|
||||
OptionalEdge<"root", "clang_objective_c",
|
||||
(case (switch_on "clang"), (inc_weight))>,
|
||||
OptionalEdge<"root", "clang_objective_cpp",
|
||||
(case (switch_on "clang"), (inc_weight))>,
|
||||
Edge<"clang_c", "llc">,
|
||||
Edge<"clang_cpp", "llc">,
|
||||
Edge<"clang_objective_c", "llc">,
|
||||
Edge<"clang_objective_cpp", "llc">,
|
||||
OptionalEdge<"llc", "as", (case (switch_on "clang"), (inc_weight))>,
|
||||
Edge<"as", "llvm_ld">
|
||||
(optional_edge "root", "clang_c",
|
||||
(case (switch_on "clang"), (inc_weight))),
|
||||
(optional_edge "root", "clang_cpp",
|
||||
(case (switch_on "clang"), (inc_weight))),
|
||||
(optional_edge "root", "clang_objective_c",
|
||||
(case (switch_on "clang"), (inc_weight))),
|
||||
(optional_edge "root", "clang_objective_cpp",
|
||||
(case (switch_on "clang"), (inc_weight))),
|
||||
(edge "clang_c", "llc"),
|
||||
(edge "clang_cpp", "llc"),
|
||||
(edge "clang_objective_c", "llc"),
|
||||
(edge "clang_objective_cpp", "llc"),
|
||||
(optional_edge "llc", "as", (case (switch_on "clang"), (inc_weight))),
|
||||
(edge "as", "llvm_ld")
|
||||
]>;
|
||||
Reference in new issue
Block a user