diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2010-02-23 09:59:30 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2010-02-23 09:59:30 +0000 |
commit | df49077d644a662a1ca301574fb6341c800c7df6 (patch) | |
tree | 224339c627ce1c81e4a394892765841b25a75d9b /tools/llvmc/plugins | |
parent | b93b3996d5b63943940f59bcbc9ef1b7d7b3f41b (diff) | |
download | external_llvm-df49077d644a662a1ca301574fb6341c800c7df6.tar.gz external_llvm-df49077d644a662a1ca301574fb6341c800c7df6.tar.bz2 external_llvm-df49077d644a662a1ca301574fb6341c800c7df6.zip |
Update mcc16 and the ancient Clang plugin for the 'cmd_line' -> 'command' change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc/plugins')
-rw-r--r-- | tools/llvmc/plugins/Clang/Clang.td | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/tools/llvmc/plugins/Clang/Clang.td b/tools/llvmc/plugins/Clang/Clang.td index cea2b5d974..988d9b1c8a 100644 --- a/tools/llvmc/plugins/Clang/Clang.td +++ b/tools/llvmc/plugins/Clang/Clang.td @@ -24,23 +24,17 @@ class clang_based<string language, string cmd, string ext_E> : Tool< [(in_language language), (out_language "llvm-bitcode"), (output_suffix "bc"), - (cmd_line (case - (switch_on "E"), - (case - (not_empty "o"), - !strconcat(cmd, " -E $INFILE -o $OUTFILE"), - (default), - !strconcat(cmd, " -E $INFILE")), - (and (switch_on "S"), (switch_on "emit-llvm")), - !strconcat(cmd, " -emit-llvm $INFILE -o $OUTFILE"), - (default), - !strconcat(cmd, " -emit-llvm-bc $INFILE -o $OUTFILE"))), + (command cmd), (actions (case (switch_on "E"), - [(stop_compilation), (output_suffix ext_E)], + [(forward "E"), (stop_compilation), (output_suffix ext_E)], + (and (switch_on "E"), (empty "o")), (no_out_file), (switch_on "fsyntax-only"), (stop_compilation), - (and (switch_on "S"), (switch_on "emit-llvm")), - [(stop_compilation), (output_suffix "ll")], - (and (switch_on "c"), (switch_on "emit-llvm")), + (switch_on ["S", "emit-llvm"]), + [(append_cmd "-emit-llvm"), + (stop_compilation), (output_suffix "ll")], + (not (switch_on ["S", "emit-llvm"])), + (append_cmd "-emit-llvm-bc"), + (switch_on ["c", "emit-llvm"]), (stop_compilation), (not_empty "include"), (forward "include"), (not_empty "I"), (forward "I"))), @@ -58,7 +52,7 @@ def as : Tool< [(in_language "assembler"), (out_language "object-code"), (output_suffix "o"), - (cmd_line "as $INFILE -o $OUTFILE"), + (command "as"), (actions (case (not_empty "Wa,"), (forward_value "Wa,"), (switch_on "c"), (stop_compilation))) ]>; @@ -68,7 +62,7 @@ def llvm_ld : Tool< [(in_language "object-code"), (out_language "executable"), (output_suffix "out"), - (cmd_line "llvm-ld -native -disable-internalize $INFILE -o $OUTFILE"), + (command "llvm-ld -native -disable-internalize"), (actions (case (switch_on "pthread"), (append_cmd "-lpthread"), (not_empty "L"), (forward "L"), |