diff options
author | Eric Christopher <echristo@gmail.com> | 2015-01-29 00:56:17 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-01-29 00:56:17 +0000 |
commit | cc7ff50e43c278fb02b2ac3d22b60321eb69ede0 (patch) | |
tree | e78fe2f04b8ce8282f35ddfe6a776b72b1e090a1 /clang/lib/Driver/Tools.cpp | |
parent | 8fcb0ad8a627bcb1415825fbebf7454c128128ef (diff) | |
download | bcm5719-llvm-cc7ff50e43c278fb02b2ac3d22b60321eb69ede0.tar.gz bcm5719-llvm-cc7ff50e43c278fb02b2ac3d22b60321eb69ede0.zip |
Ensure that -fsyntax-only with fortran 90 passes along silently
to the underlying gcc.
PR22234
Patch by Artem Belevich.
llvm-svn: 227409
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index a2b494de74c..1ff5be7b034 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -5116,16 +5116,21 @@ void gcc::Compile::RenderExtraToolArgs(const JobAction &JA, ArgStringList &CmdArgs) const { const Driver &D = getToolChain().getDriver(); + switch (JA.getType()) { // If -flto, etc. are present then make sure not to force assembly output. - if (JA.getType() == types::TY_LLVM_IR || JA.getType() == types::TY_LTO_IR || - JA.getType() == types::TY_LLVM_BC || JA.getType() == types::TY_LTO_BC) + case types::TY_LLVM_IR: + case types::TY_LTO_IR: + case types::TY_LLVM_BC: + case types::TY_LTO_BC: CmdArgs.push_back("-c"); - else { - if (JA.getType() != types::TY_PP_Asm) - D.Diag(diag::err_drv_invalid_gcc_output_type) - << getTypeName(JA.getType()); - + break; + case types::TY_PP_Asm: CmdArgs.push_back("-S"); + case types::TY_Nothing: + CmdArgs.push_back("-fsyntax-only"); + break; + default: + D.Diag(diag::err_drv_invalid_gcc_output_type) << getTypeName(JA.getType()); } } |