summaryrefslogtreecommitdiff
path: root/tools/llvmc2
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2008-05-30 06:13:02 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2008-05-30 06:13:02 +0000
commit5c7578de087fb984473277316edd19908d0e8190 (patch)
tree42868b9dd13532077ed3f6c254cb05b5cd9d6cda /tools/llvmc2
parent08bd2e74dc542ab4e7484f1d61e22f6fd96c48ed (diff)
downloadllvm-5c7578de087fb984473277316edd19908d0e8190.tar.gz
llvm-5c7578de087fb984473277316edd19908d0e8190.tar.bz2
llvm-5c7578de087fb984473277316edd19908d0e8190.tar.xz
Make it possible to change the output file suffix based on command-line options.
For instance, the following command: llvmc2 -E hello.c now generates a file with the correct suffix (hello.i). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51733 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc2')
-rw-r--r--tools/llvmc2/Tools.td7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/llvmc2/Tools.td b/tools/llvmc2/Tools.td
index 63b713fb0a..42060e3b2c 100644
--- a/tools/llvmc2/Tools.td
+++ b/tools/llvmc2/Tools.td
@@ -30,10 +30,7 @@ def llvm_gcc_c : Tool<
"llvm-g++ -E -x c $INFILE -o $OUTFILE -emit-llvm",
(default),
"llvm-g++ -c -x c $INFILE -o $OUTFILE -emit-llvm")),
- // TOFIX: Preprocessed files currently have suffix ".bc".
- (switch_option "E", (stop_compilation),
- // Make this possible:
- // (output_suffix "i"),
+ (switch_option "E", (stop_compilation),(output_suffix "i"),
(help "Stop after the preprocessing stage, do not run the compiler")),
(sink)
]>;
@@ -47,7 +44,7 @@ def llvm_gcc_cpp : Tool<
"llvm-g++ -E -x c++ $INFILE -o $OUTFILE -emit-llvm",
(default),
"llvm-g++ -c -x c++ $INFILE -o $OUTFILE -emit-llvm")),
- (switch_option "E", (stop_compilation)),
+ (switch_option "E", (stop_compilation), (output_suffix "i")),
(sink)
]>;