]> granicus.if.org Git - clang/commitdiff
Fix regression in r227409 where we were passing -fsyntax-only
authorEric Christopher <echristo@gmail.com>
Fri, 30 Jan 2015 18:22:23 +0000 (18:22 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 30 Jan 2015 18:22:23 +0000 (18:22 +0000)
in all cases.

Patch by Artem Belevich.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227591 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp
test/Driver/gfortran.f90

index ceb6775a3dcc324701962577eaec595eb40bdd5e..512aad2ca69a55551fa4e40eff3532b395e81ca5 100644 (file)
@@ -5166,6 +5166,7 @@ void gcc::Compile::RenderExtraToolArgs(const JobAction &JA,
     break;
   case types::TY_PP_Asm:
     CmdArgs.push_back("-S");
+    break;
   case types::TY_Nothing:
     CmdArgs.push_back("-fsyntax-only");
     break;
index 3631f8c9f4c19375ffc60f022330127f9600dcad..e687e51b4df3504ca932fbf42fe5fe40157de5c8 100644 (file)
 !
 ! CHECK-PR22234-NOT: clang: error: invalid output type
 ! CHECK-PR22234: "-fsyntax-only"
+!
+! Regression test for the bug introduced with PR22234 fix.
+! Make sure -fsyntax-only is not passed to gfortran during normal compilation.
+!
+! RUN: %clang -no-canonical-prefixes -target i386-linux -### %s -o %t 2>&1 \
+! RUN: | FileCheck %s --check-prefix=CHECK-PR22234-R
+! CHECK-PR22234-R-NOT: "-fsyntax-only"