-E should print to stdout.
authorMikhail Glushenkov <foldr@codedgers.com>
Fri, 30 May 2008 06:18:50 +0000 (06:18 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Fri, 30 May 2008 06:18:50 +0000 (06:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51743 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvmc2/Tools.td
tools/llvmc2/examples/Clang.td

index ae60874ea8f50a87b331ca389ad8a60ae95893c5..0e3faa3990a67464c5dc7c6efd27791b85976fd4 100644 (file)
@@ -27,10 +27,10 @@ def llvm_gcc_c : Tool<
  (output_suffix "bc"),
  (cmd_line (case
             (switch_on "E"),
-              "llvm-g++ -E -x c $INFILE -o $OUTFILE",
+              "llvm-g++ -E -x c $INFILE",
             (default),
               "llvm-g++ -c -x c $INFILE -o $OUTFILE -emit-llvm")),
- (switch_option "E", (stop_compilation),(output_suffix "i"),
+ (switch_option "E", (stop_compilation),
    (help "Stop after the preprocessing stage, do not run the compiler")),
  (sink)
 ]>;
@@ -41,10 +41,10 @@ def llvm_gcc_cpp : Tool<
  (output_suffix "bc"),
  (cmd_line (case
             (switch_on "E"),
-              "llvm-g++ -E -x c++ $INFILE -o $OUTFILE",
+              "llvm-g++ -E -x c++ $INFILE",
             (default),
               "llvm-g++ -c -x c++ $INFILE -o $OUTFILE -emit-llvm")),
- (switch_option "E", (stop_compilation), (output_suffix "i")),
+ (switch_option "E", (stop_compilation)),
  (sink)
 ]>;
 
index c06737238b3bb456fe785f1653e79f99d4c25c66..bc9342d9797a02420e08e4eb64deca9f8937df0c 100644 (file)
@@ -8,7 +8,8 @@ def clang : Tool<
 [(in_language ["c", "c++", "objective-c"]),
  (out_language "llvm-bitcode"),
  (output_suffix "bc"),
- (cmd_line (case (switch_on "E"), "clang -E $INFILE -o $OUTFILE",
+ // TOFIX: We should be able to test the language of the input file
+ (cmd_line (case (switch_on "E"), "clang -E $INFILE",
                  (default), "clang -emit-llvm-bc $INFILE -o $OUTFILE")),
  (switch_option "E", (stop_compilation), (output_suffix "i"),
    (help "Stop after the preprocessing stage, do not run the compiler")),