From 47e87db3a1ef79816e1a4fc6b1b450fcd5daf77d Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Tue, 21 Sep 2010 14:59:47 +0000 Subject: [PATCH] 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 --- tools/llvmc/src/Base.td.in | 46 +++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/tools/llvmc/src/Base.td.in b/tools/llvmc/src/Base.td.in index f82276c7c3f..12c283a432b 100644 --- a/tools/llvmc/src/Base.td.in +++ b/tools/llvmc/src/Base.td.in @@ -165,10 +165,10 @@ def Preprocess : OptionPreprocessor< // Tools class llvm_gcc_based : 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 ; -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 +: llvm_gcc_based; -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 +: llvm_gcc_based; + +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"),