diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-30 06:13:02 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-30 06:13:02 +0000 |
commit | abab33b4351f735f9d95eaa9d4c0fea2126423d6 (patch) | |
tree | 42868b9dd13532077ed3f6c254cb05b5cd9d6cda /tools/llvmc2 | |
parent | 793f63db7b1d534647d90b7ee7194d36aced0c66 (diff) | |
download | external_llvm-abab33b4351f735f9d95eaa9d4c0fea2126423d6.zip external_llvm-abab33b4351f735f9d95eaa9d4c0fea2126423d6.tar.gz external_llvm-abab33b4351f735f9d95eaa9d4c0fea2126423d6.tar.bz2 |
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.td | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/llvmc2/Tools.td b/tools/llvmc2/Tools.td index 63b713f..42060e3 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) ]>; |