Add -E and -S options
authorMikhail Glushenkov <foldr@codedgers.com>
Thu, 8 May 2008 20:02:36 +0000 (20:02 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Thu, 8 May 2008 20:02:36 +0000 (20:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50868 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvmc2/Tools.td

index 4b57a503e546f9d95f5d6a93b93c28048ce914b8..26925628d19a6149bcd9bebcaf66ce9375e97b47 100644 (file)
@@ -26,6 +26,8 @@ def llvm_gcc_c : Tool<
  (out_language "llvm-bitcode"),
  (output_suffix "bc"),
  (cmd_line "llvm-gcc -c -x c $INFILE -o $OUTFILE -emit-llvm"),
+ (switch_option "E", (stop_compilation),
+   (help "Stop after the preprocessing stage, do not run the compiler")),
  (sink)
 ]>;
 
@@ -34,6 +36,7 @@ def llvm_gcc_cpp : Tool<
  (out_language "llvm-bitcode"),
  (output_suffix "bc"),
  (cmd_line "llvm-g++ -c -x c++ $INFILE -o $OUTFILE -emit-llvm"),
+ (switch_option "E", (stop_compilation)),
  (sink)
 ]>;
 
@@ -56,6 +59,8 @@ def llc : Tool<
 [(in_language "llvm-bitcode"),
  (out_language "assembler"),
  (output_suffix "s"),
+ (switch_option "S", (stop_compilation),
+                (help "Stop after compilation, do not assemble")),
  (cmd_line "llc -f $INFILE -o $OUTFILE")
 ]>;