Skip to content
Snippets Groups Projects
Commit 67630080 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Make -fsyntax-only, -include and -emit-llvm work for C++ and Objective-C/C++.

llvm-svn: 60047
parent 86d5fa8f
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ def llvm_gcc_c : Tool< ...@@ -22,7 +22,7 @@ def llvm_gcc_c : Tool<
(default), (default),
"llvm-gcc -E -x c++ $INFILE"), "llvm-gcc -E -x c++ $INFILE"),
(switch_on "fsyntax-only"), (switch_on "fsyntax-only"),
"llvm-gcc -c -x c $INFILE", "llvm-gcc -fsyntax-only -x c $INFILE",
(default), (default),
"llvm-gcc -c -x c $INFILE -o $OUTFILE -emit-llvm")), "llvm-gcc -c -x c $INFILE -o $OUTFILE -emit-llvm")),
(switch_option "emit-llvm", (stop_compilation), (switch_option "emit-llvm", (stop_compilation),
...@@ -46,9 +46,14 @@ def llvm_gcc_cpp : Tool< ...@@ -46,9 +46,14 @@ def llvm_gcc_cpp : Tool<
"llvm-g++ -E -x c++ $INFILE -o $OUTFILE", "llvm-g++ -E -x c++ $INFILE -o $OUTFILE",
(default), (default),
"llvm-g++ -E -x c++ $INFILE"), "llvm-g++ -E -x c++ $INFILE"),
(switch_on "fsyntax-only"),
"llvm-g++ -fsyntax-only -x c++ $INFILE",
(default), (default),
"llvm-g++ -c -x c++ $INFILE -o $OUTFILE -emit-llvm")), "llvm-g++ -c -x c++ $INFILE -o $OUTFILE -emit-llvm")),
(switch_option "emit-llvm", (stop_compilation)),
(switch_option "E", (stop_compilation)), (switch_option "E", (stop_compilation)),
(switch_option "fsyntax-only", (stop_compilation)),
(parameter_list_option "include", (forward)),
(sink) (sink)
]>; ]>;
...@@ -62,9 +67,14 @@ def llvm_gcc_m : Tool< ...@@ -62,9 +67,14 @@ def llvm_gcc_m : Tool<
"llvm-gcc -E -x objective-c $INFILE -o $OUTFILE", "llvm-gcc -E -x objective-c $INFILE -o $OUTFILE",
(default), (default),
"llvm-gcc -E -x objective-c $INFILE"), "llvm-gcc -E -x objective-c $INFILE"),
(switch_on "fsyntax-only"),
"llvm-gcc -fsyntax-only -x objective-c $INFILE",
(default), (default),
"llvm-gcc -c -x objective-c $INFILE -o $OUTFILE -emit-llvm")), "llvm-gcc -c -x objective-c $INFILE -o $OUTFILE -emit-llvm")),
(switch_option "emit-llvm", (stop_compilation)),
(switch_option "E", (stop_compilation)), (switch_option "E", (stop_compilation)),
(switch_option "fsyntax-only", (stop_compilation)),
(parameter_list_option "include", (forward)),
(sink) (sink)
]>; ]>;
...@@ -78,9 +88,14 @@ def llvm_gcc_mxx : Tool< ...@@ -78,9 +88,14 @@ def llvm_gcc_mxx : Tool<
"llvm-gcc -E -x objective-c++ $INFILE -o $OUTFILE", "llvm-gcc -E -x objective-c++ $INFILE -o $OUTFILE",
(default), (default),
"llvm-gcc -E -x objective-c++ $INFILE"), "llvm-gcc -E -x objective-c++ $INFILE"),
(switch_on "fsyntax-only"),
"llvm-gcc -fsyntax-only -x objective-c++ $INFILE",
(default), (default),
"llvm-gcc -c -x objective-c++ $INFILE -o $OUTFILE -emit-llvm")), "llvm-gcc -c -x objective-c++ $INFILE -o $OUTFILE -emit-llvm")),
(switch_option "emit-llvm", (stop_compilation)),
(switch_option "E", (stop_compilation)), (switch_option "E", (stop_compilation)),
(switch_option "fsyntax-only", (stop_compilation)),
(parameter_list_option "include", (forward)),
(sink) (sink)
]>; ]>;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment