summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvmc/plugins
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-02-23 09:59:30 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-02-23 09:59:30 +0000
commit527bfeeda78be59d6da5200b284cbff7d669d918 (patch)
treeb8c687242cde4278802ff8e89cfee4fbe158fdf6 /llvm/tools/llvmc/plugins
parent8657a02e3e8bb11c3d15a093abc990c723af4856 (diff)
downloadbcm5719-llvm-527bfeeda78be59d6da5200b284cbff7d669d918.tar.gz
bcm5719-llvm-527bfeeda78be59d6da5200b284cbff7d669d918.zip
Update mcc16 and the ancient Clang plugin for the 'cmd_line' -> 'command' change.
llvm-svn: 96933
Diffstat (limited to 'llvm/tools/llvmc/plugins')
-rw-r--r--llvm/tools/llvmc/plugins/Clang/Clang.td28
1 files changed, 11 insertions, 17 deletions
diff --git a/llvm/tools/llvmc/plugins/Clang/Clang.td b/llvm/tools/llvmc/plugins/Clang/Clang.td
index cea2b5d974e..988d9b1c8ab 100644
--- a/llvm/tools/llvmc/plugins/Clang/Clang.td
+++ b/llvm/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"),
OpenPOWER on IntegriCloud