mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
llvmc: split llvm_gcc_based into llvm_gcc_{pch,comp}_based.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
46aa524f0d
commit
47e87db3a1
@ -165,10 +165,10 @@ def Preprocess : OptionPreprocessor<
|
||||
// Tools
|
||||
|
||||
class llvm_gcc_based <string cmd, string in_lang,
|
||||
string E_ext, string out_lang> : Tool<
|
||||
string E_ext, string out_lang, string out_ext> : Tool<
|
||||
[(in_language in_lang),
|
||||
(out_language "llvm-bitcode"),
|
||||
(output_suffix out_lang),
|
||||
(out_language out_lang),
|
||||
(output_suffix out_ext),
|
||||
(command cmd),
|
||||
(actions
|
||||
(case
|
||||
@ -214,24 +214,29 @@ class llvm_gcc_based <string cmd, string in_lang,
|
||||
(sink)
|
||||
]>;
|
||||
|
||||
def llvm_gcc_c : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x c", "c", "i", "bc">;
|
||||
def llvm_gcc_cpp : llvm_gcc_based<"@LLVMGXXCOMMAND@ -x c++", "c++", "i", "bc">;
|
||||
def llvm_gcc_m : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x objective-c",
|
||||
"objective-c", "mi", "bc">;
|
||||
def llvm_gcc_mxx : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x objective-c++",
|
||||
"objective-c++", "mi", "bc">;
|
||||
class llvm_gcc_comp_based <string cmd, string in_lang, string E_ext>
|
||||
: llvm_gcc_based<cmd, in_lang, E_ext, "llvm-bitcode", "bc">;
|
||||
|
||||
def llvm_gcc_c_pch : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x c-header",
|
||||
"c-header", "i", "gch">;
|
||||
def llvm_gcc_cpp_pch : llvm_gcc_based<"@LLVMGXXCOMMAND@ -x c++-header",
|
||||
"c++-header",
|
||||
"i", "gch">;
|
||||
def llvm_gcc_m_pch : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x objective-c-header",
|
||||
"objective-c-header",
|
||||
"mi", "gch">;
|
||||
def llvm_gcc_mxx_pch
|
||||
: llvm_gcc_based<"@LLVMGCCCOMMAND@ -x objective-c++-header",
|
||||
"objective-c++-header", "mi", "gch">;
|
||||
class llvm_gcc_pch_based <string cmd, string in_lang, string E_ext>
|
||||
: llvm_gcc_based<cmd, in_lang, E_ext, "precompiled-header", "gch">;
|
||||
|
||||
def llvm_gcc_c : llvm_gcc_comp_based
|
||||
<"@LLVMGCCCOMMAND@ -x c", "c", "i">;
|
||||
def llvm_gcc_cpp : llvm_gcc_comp_based
|
||||
<"@LLVMGXXCOMMAND@ -x c++", "c++", "i">;
|
||||
def llvm_gcc_m : llvm_gcc_comp_based
|
||||
<"@LLVMGCCCOMMAND@ -x objective-c", "objective-c", "mi">;
|
||||
def llvm_gcc_mxx : llvm_gcc_comp_based
|
||||
<"@LLVMGCCCOMMAND@ -x objective-c++", "objective-c++", "mi">;
|
||||
|
||||
def llvm_gcc_c_pch : llvm_gcc_pch_based
|
||||
<"@LLVMGCCCOMMAND@ -x c-header", "c-header", "i">;
|
||||
def llvm_gcc_cpp_pch : llvm_gcc_pch_based
|
||||
<"@LLVMGXXCOMMAND@ -x c++-header", "c++-header", "i">;
|
||||
def llvm_gcc_m_pch : llvm_gcc_pch_based
|
||||
<"@LLVMGCCCOMMAND@ -x objective-c-header", "objective-c-header", "mi">;
|
||||
def llvm_gcc_mxx_pch : llvm_gcc_pch_based
|
||||
<"@LLVMGCCCOMMAND@ -x objective-c++-header", "objective-c++-header", "mi">;
|
||||
|
||||
def opt : Tool<
|
||||
[(in_language "llvm-bitcode"),
|
||||
@ -343,6 +348,7 @@ def llvm_gcc_cpp_linker : llvm_gcc_based_linker<"@LLVMGXXCOMMAND@",
|
||||
// Language map
|
||||
|
||||
def LanguageMap : LanguageMap<[
|
||||
(lang_to_suffixes "precompiled-header", ["gch", "pch"]),
|
||||
(lang_to_suffixes "c++", ["cc", "cp", "cxx", "cpp", "CPP", "c++", "C"]),
|
||||
(lang_to_suffixes "c++-header", "hpp"),
|
||||
(lang_to_suffixes "c", "c"),
|
||||
|
Loading…
Reference in New Issue
Block a user