diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -2368,13 +2368,13 @@ PosFlag, - NegFlag>; + NegFlag>; defm approx_func : BoolFOption<"approx-func", LangOpts<"ApproxFunc">, DefaultFalse, PosFlag, - NegFlag>; + NegFlag>; defm finite_math_only : BoolFOption<"finite-math-only", LangOpts<"FiniteMathOnly">, DefaultFalse, PosFlag, - PosFlag>; + PosFlag>; def fhonor_nans : Flag<["-"], "fhonor-nans">, Group, Visibility<[ClangOption, FlangOption]>, HelpText<"Specify that floating-point optimizations are not allowed that " @@ -3385,12 +3385,12 @@ LangOpts<"ROPI">, DefaultFalse, PosFlag, - NegFlag>; + NegFlag>; defm rwpi : BoolFOption<"rwpi", LangOpts<"RWPI">, DefaultFalse, PosFlag, - NegFlag>; + NegFlag>; def fplugin_EQ : Joined<["-"], "fplugin=">, Group, Flags<[NoXarchOption]>, MetaVarName<"">, HelpText<"Load the named plugin (dynamic shared object)">; @@ -5313,7 +5313,7 @@ defm integrated_as : BoolFOption<"integrated-as", CodeGenOpts<"DisableIntegratedAS">, DefaultFalse, NegFlag, - PosFlag, + PosFlag, BothFlags<[], [ClangOption], " the integrated assembler">>; def fintegrated_cc1 : Flag<["-"], "fintegrated-cc1">, diff --git a/flang/test/Driver/driver-help-hidden.f90 b/flang/test/Driver/driver-help-hidden.f90 --- a/flang/test/Driver/driver-help-hidden.f90 +++ b/flang/test/Driver/driver-help-hidden.f90 @@ -43,6 +43,7 @@ ! CHECK-NEXT: -fhonor-nans Specify that floating-point optimizations are not allowed that assume arguments and results are not NANs. ! CHECK-NEXT: -fimplicit-none No implicit typing allowed unless overridden by IMPLICIT statements ! CHECK-NEXT: -finput-charset= Specify the default character set for source files +! CHECK-NEXT: -fintegrated-as Enable the integrated assembler ! CHECK-NEXT: -fintrinsic-modules-path ! CHECK-NEXT: Specify where to find the compiled intrinsic modules ! CHECK-NEXT: -flang-experimental-hlfir diff --git a/flang/test/Driver/driver-help.f90 b/flang/test/Driver/driver-help.f90 --- a/flang/test/Driver/driver-help.f90 +++ b/flang/test/Driver/driver-help.f90 @@ -39,6 +39,7 @@ ! HELP-NEXT: -fhonor-nans Specify that floating-point optimizations are not allowed that assume arguments and results are not NANs. ! HELP-NEXT: -fimplicit-none No implicit typing allowed unless overridden by IMPLICIT statements ! HELP-NEXT: -finput-charset= Specify the default character set for source files +! HELP-NEXT: -fintegrated-as Enable the integrated assembler ! HELP-NEXT: -fintrinsic-modules-path ! HELP-NEXT: Specify where to find the compiled intrinsic modules ! HELP-NEXT: -flarge-sizes Use INTEGER(KIND=8) for the result type in size-related intrinsics diff --git a/flang/test/Driver/fno-integrated-as.f90 b/flang/test/Driver/fintegrated-as.f90 rename from flang/test/Driver/fno-integrated-as.f90 rename to flang/test/Driver/fintegrated-as.f90 --- a/flang/test/Driver/fno-integrated-as.f90 +++ b/flang/test/Driver/fintegrated-as.f90 @@ -1,4 +1,4 @@ -! Tests for the `-fno-integrated-as` flag. +! Tests for the `-f(no-)integrated-as` flag. ! UNSUPPORTED: system-windows @@ -11,10 +11,11 @@ ! CHECK-SAME: "-o" "[[assembly_file:.*]].s" ! CHECK-NEXT: "-o" "{{.*}}.o" "[[assembly_file:.*]].s" -!----------------------------- -! Without `-fno-integrated-as` -!----------------------------- +!---------------------------------------------------------------- +! Without `-fno-integrated-as` / With `-fintegrated-as` (default) +!---------------------------------------------------------------- ! Verify that there _is no_ separate line with an assembler invocation +! RUN: %flang -c -fintegrated-as %s -### 2>&1 | FileCheck %s -check-prefix=DEFAULT ! RUN: %flang -c %s -### 2>&1 | FileCheck %s -check-prefix=DEFAULT ! DEFAULT-LABEL: "-fc1" -! DEFAULT-SAME: "-o" "{{.*}}.o" "{{.*}}fno-integrated-as.f90" +! DEFAULT-SAME: "-o" "{{.*}}.o" "{{.*}}fintegrated-as.f90"