[llvm-commits] [llvm] r96933 - in /llvm/trunk/tools/llvmc: Makefile example/mcc16/plugins/PIC16Base/PIC16Base.td plugins/Clang/Clang.td

Mikhail Glushenkov foldr at codedgers.com
Tue Feb 23 01:59:30 PST 2010


Author: foldr
Date: Tue Feb 23 03:59:30 2010
New Revision: 96933

URL: http://llvm.org/viewvc/llvm-project?rev=96933&view=rev
Log:
Update mcc16 and the ancient Clang plugin for the 'cmd_line' -> 'command' change.

Modified:
    llvm/trunk/tools/llvmc/Makefile
    llvm/trunk/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td
    llvm/trunk/tools/llvmc/plugins/Clang/Clang.td

Modified: llvm/trunk/tools/llvmc/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/Makefile?rev=96933&r1=96932&r2=96933&view=diff
==============================================================================
--- llvm/trunk/tools/llvmc/Makefile (original)
+++ llvm/trunk/tools/llvmc/Makefile Tue Feb 23 03:59:30 2010
@@ -10,7 +10,7 @@
 LEVEL = ../..
 
 export LLVMC_BASED_DRIVER_NAME = llvmc
-export LLVMC_BUILTIN_PLUGINS = Base
+export LLVMC_BUILTIN_PLUGINS = Base Clang
 REQUIRES_RTTI = 1
 
 DIRS = plugins driver

Modified: llvm/trunk/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td?rev=96933&r1=96932&r2=96933&view=diff
==============================================================================
--- llvm/trunk/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td (original)
+++ llvm/trunk/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td Tue Feb 23 03:59:30 2010
@@ -72,16 +72,14 @@
 [(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")),
-           (default), !strconcat(cmd, " $INFILE -o $OUTFILE"))),
- (actions (case 
-                (and (multiple_input_files), (or (switch_on "S"), (switch_on "c"))),
-              (error "cannot specify -o with -c or -S with multiple files"),
-                (switch_on "E"), [(stop_compilation), (output_suffix ext_E)],
+ (command cmd),
+ (actions (case
+                (and (multiple_input_files),
+                     (or (switch_on "S"), (switch_on "c"))),
+                  (error "cannot specify -o with -c or -S with multiple files"),
+                (switch_on "E"), [(forward "E"),
+                                  (stop_compilation), (output_suffix ext_E)],
+                (and (switch_on "E"), (empty "o")), (no_out_file),
                 (switch_on "bc"),[(stop_compilation), (output_suffix "bc")],
                 (switch_on "g"), (append_cmd "-g"),
                 (switch_on "w"), (append_cmd "-w"),
@@ -116,12 +114,13 @@
  (in_language "llvm-bitcode"),
  (out_language "llvm-bitcode"),
  (output_suffix "bc"),
- (cmd_line "$CALL(GetBinDir)llvm-ld -L $CALL(GetStdLibsDir) -disable-gvn -disable-licm-promotion -disable-mem2reg $INFILE -b $OUTFILE -l std"),
+ (command "$CALL(GetBinDir)llvm-ld -L $CALL(GetStdLibsDir) -disable-gvn -disable-licm-promotion -disable-mem2reg -l std"),
+ (out_file_option "-b"),
  (actions (case
           (switch_on "O0"), (append_cmd "-disable-opt"),
           (switch_on "O1"), (append_cmd "-disable-opt"),
 // Whenever O3 is not specified on the command line, default i.e. disable-inlining will always be added.
-          (switch_on "O2"), (append_cmd ""), 
+          (switch_on "O2"), (append_cmd ""),
           (switch_on "O3"), (append_cmd ""),
           (default), (append_cmd "-disable-inlining"))),
  (join)
@@ -134,12 +133,13 @@
  (output_suffix "bc"),
 // FIXME: we are still not disabling licm-promotion.
 // -disable-licm-promotion and building stdn library causes c16-71 to fail.
- (cmd_line "$CALL(GetBinDir)llvm-ld -disable-gvn -disable-mem2reg                              $INFILE -b $OUTFILE"),
+ (command "$CALL(GetBinDir)llvm-ld -disable-gvn -disable-mem2reg"),
+ (out_file_option "-b"),
  (actions (case
           (switch_on "O0"), (append_cmd "-disable-opt"),
           (switch_on "O1"), (append_cmd "-disable-opt"),
 // Whenever O3 is not specified on the command line, default i.e. disable-inlining will always be added.
-          (switch_on "O2"), (append_cmd ""), 
+          (switch_on "O2"), (append_cmd ""),
           (switch_on "O3"), (append_cmd ""),
           (default), (append_cmd "-disable-inlining")))
 ]>;
@@ -149,7 +149,7 @@
  (in_language "llvm-bitcode"),
  (out_language "llvm-bitcode"),
  (output_suffix "obc"),
- (cmd_line "$CALL(GetBinDir)opt -pic16cg -pic16overlay $INFILE -f -o $OUTFILE"),
+ (command "$CALL(GetBinDir)opt -pic16cg -pic16overlay -f"),
  (actions (case
           (switch_on "O0"), (append_cmd "-disable-opt")))
 ]>;
@@ -158,7 +158,7 @@
  (in_language "llvm-bitcode"),
  (out_language "assembler"),
  (output_suffix "s"),
- (cmd_line "$CALL(GetBinDir)llc -march=pic16 -disable-jump-tables -pre-RA-sched=list-burr -f $INFILE -o $OUTFILE"),
+ (command "$CALL(GetBinDir)llc -march=pic16 -disable-jump-tables -pre-RA-sched=list-burr -f"),
  (actions (case
           (switch_on "S"), (stop_compilation),
 //          (not_empty "Wllc,"), (unpack_values "Wllc,"),
@@ -171,7 +171,7 @@
  (in_language "assembler"),
  (out_language "object-code"),
  (output_suffix "o"),
- (cmd_line "$CALL(GetBinDir)gpasm -z -r decimal -I $CALL(GetStdAsmHeadersDir) -C -c -w 2 $INFILE -o $OUTFILE"),
+ (command "$CALL(GetBinDir)gpasm -z -r decimal -I $CALL(GetStdAsmHeadersDir) -C -c -w 2"),
  (actions (case
           (switch_on "c"), (stop_compilation),
           (switch_on "g"), (append_cmd "-g"),
@@ -184,7 +184,7 @@
  (in_language "object-code"),
  (out_language "executable"),
  (output_suffix "cof"),
- (cmd_line "$CALL(GetBinDir)mplink -e -k $CALL(GetStdLinkerScriptsDir) -l $CALL(GetStdLibsDir) intrinsics.lib stdn.lib $INFILE -o $OUTFILE"),
+ (command "$CALL(GetBinDir)mplink -e -k $CALL(GetStdLinkerScriptsDir) -l $CALL(GetStdLibsDir) intrinsics.lib stdn.lib"),
  (actions (case
           (not_empty "Wl,"), (forward_value "Wl,"),
           (switch_on "X"), (append_cmd "-x"),
@@ -217,13 +217,13 @@
 def CompilationGraph : CompilationGraph<[
     Edge<"root", "clang_cc">,
     Edge<"root", "llvm_ld">,
-    OptionalEdge<"root", "llvm_ld_optimizer", (case 
+    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 
+    OptionalEdge<"clang_cc", "llvm_ld_optimizer", (case
                                          (switch_on "S"), (inc_weight),
                                          (switch_on "c"), (inc_weight))>,
     Edge<"llvm_ld", "pic16passes">,

Modified: llvm/trunk/tools/llvmc/plugins/Clang/Clang.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Clang/Clang.td?rev=96933&r1=96932&r2=96933&view=diff
==============================================================================
--- llvm/trunk/tools/llvmc/plugins/Clang/Clang.td (original)
+++ llvm/trunk/tools/llvmc/plugins/Clang/Clang.td Tue Feb 23 03:59:30 2010
@@ -24,23 +24,17 @@
 [(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 @@
 [(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 @@
 [(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"),





More information about the llvm-commits mailing list