diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-11-25 21:35:20 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-11-25 21:35:20 +0000 |
commit | 67630080b9022d0a4ef2da0f13986c876efc51ed (patch) | |
tree | fc3bdad37ceb9ae4304065200335cc58f3b3c6e2 | |
parent | 86d5fa8f2821298a318d34eacad3f880ed5ef754 (diff) | |
download | bcm5719-llvm-67630080b9022d0a4ef2da0f13986c876efc51ed.tar.gz bcm5719-llvm-67630080b9022d0a4ef2da0f13986c876efc51ed.zip |
Make -fsyntax-only, -include and -emit-llvm work for C++ and Objective-C/C++.
llvm-svn: 60047
-rw-r--r-- | llvm/include/llvm/CompilerDriver/Tools.td | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/llvm/include/llvm/CompilerDriver/Tools.td b/llvm/include/llvm/CompilerDriver/Tools.td index fa2cd33ffbd..930092d8dfb 100644 --- a/llvm/include/llvm/CompilerDriver/Tools.td +++ b/llvm/include/llvm/CompilerDriver/Tools.td @@ -22,7 +22,7 @@ def llvm_gcc_c : Tool< (default), "llvm-gcc -E -x c++ $INFILE"), (switch_on "fsyntax-only"), - "llvm-gcc -c -x c $INFILE", + "llvm-gcc -fsyntax-only -x c $INFILE", (default), "llvm-gcc -c -x c $INFILE -o $OUTFILE -emit-llvm")), (switch_option "emit-llvm", (stop_compilation), @@ -46,9 +46,14 @@ def llvm_gcc_cpp : Tool< "llvm-g++ -E -x c++ $INFILE -o $OUTFILE", (default), "llvm-g++ -E -x c++ $INFILE"), + (switch_on "fsyntax-only"), + "llvm-g++ -fsyntax-only -x c++ $INFILE", (default), "llvm-g++ -c -x c++ $INFILE -o $OUTFILE -emit-llvm")), + (switch_option "emit-llvm", (stop_compilation)), (switch_option "E", (stop_compilation)), + (switch_option "fsyntax-only", (stop_compilation)), + (parameter_list_option "include", (forward)), (sink) ]>; @@ -62,9 +67,14 @@ def llvm_gcc_m : Tool< "llvm-gcc -E -x objective-c $INFILE -o $OUTFILE", (default), "llvm-gcc -E -x objective-c $INFILE"), + (switch_on "fsyntax-only"), + "llvm-gcc -fsyntax-only -x objective-c $INFILE", (default), "llvm-gcc -c -x objective-c $INFILE -o $OUTFILE -emit-llvm")), + (switch_option "emit-llvm", (stop_compilation)), (switch_option "E", (stop_compilation)), + (switch_option "fsyntax-only", (stop_compilation)), + (parameter_list_option "include", (forward)), (sink) ]>; @@ -78,9 +88,14 @@ def llvm_gcc_mxx : Tool< "llvm-gcc -E -x objective-c++ $INFILE -o $OUTFILE", (default), "llvm-gcc -E -x objective-c++ $INFILE"), + (switch_on "fsyntax-only"), + "llvm-gcc -fsyntax-only -x objective-c++ $INFILE", (default), "llvm-gcc -c -x objective-c++ $INFILE -o $OUTFILE -emit-llvm")), + (switch_option "emit-llvm", (stop_compilation)), (switch_option "E", (stop_compilation)), + (switch_option "fsyntax-only", (stop_compilation)), + (parameter_list_option "include", (forward)), (sink) ]>; |