diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td index 26a9792e6a6087..3d8240f8357b40 100644 --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -445,7 +445,7 @@ def warn_drv_deprecated_arg_no_relaxed_template_template_args : Warning< "argument '-fno-relaxed-template-template-args' is deprecated">, InGroup; def warn_drv_deprecated_arg_ofast : Warning< - "argument '-Ofast' is deprecated; use '-O3 -ffast math' for the same behavior," + "argument '-Ofast' is deprecated; use '-O3 -ffast-math' for the same behavior," " or '-O3' to enable only conforming optimizations">, InGroup; def warn_drv_deprecated_custom : Warning< diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 12b20fe04675bf..fecfa2f3c7dba9 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -932,7 +932,7 @@ def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>, Alias, AliasArgs<["1"]>; def Ofast : Joined<["-"], "Ofast">, Group, Visibility<[ClangOption, CC1Option, FlangOption]>, - HelpText<"Deprecated; use '-O3 -ffast math' for the same behavior," + HelpText<"Deprecated; use '-O3 -ffast-math' for the same behavior," " or '-O3' to enable only conforming optimizations">; def P : Flag<["-"], "P">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, diff --git a/clang/test/Driver/Ofast.c b/clang/test/Driver/Ofast.c index 4c63caf9865d50..91de296a4c3ff7 100644 --- a/clang/test/Driver/Ofast.c +++ b/clang/test/Driver/Ofast.c @@ -10,7 +10,7 @@ // RUN: %clang -Ofast -fno-strict-aliasing -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-STRICT-ALIASING %s // RUN: %clang -Ofast -fno-vectorize -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-VECTORIZE %s -// CHECK-OFAST: use '-O3 -ffast math' for the same behavior, or '-O3' to enable only conforming optimizations +// CHECK-OFAST: use '-O3 -ffast-math' for the same behavior, or '-O3' to enable only conforming optimizations // CHECK-OFAST: -cc1 // CHECK-OFAST-NOT: -relaxed-aliasing // CHECK-OFAST: -ffast-math @@ -25,21 +25,21 @@ // CHECK-OFAST-O2-NOT: -Ofast // CHECK-OFAST-O2: -vectorize-loops -// CHECK-OFAST-NO-FAST-MATH: use '-O3 -ffast math' for the same behavior, or '-O3' to enable only conforming optimizations +// CHECK-OFAST-NO-FAST-MATH: use '-O3 -ffast-math' for the same behavior, or '-O3' to enable only conforming optimizations // CHECK-OFAST-NO-FAST-MATH: -cc1 // CHECK-OFAST-NO-FAST-MATH-NOT: -relaxed-aliasing // CHECK-OFAST-NO-FAST-MATH-NOT: -ffast-math // CHECK-OFAST-NO-FAST-MATH: -Ofast // CHECK-OFAST-NO-FAST-MATH: -vectorize-loops -// CHECK-OFAST-NO-STRICT-ALIASING: use '-O3 -ffast math' for the same behavior, or '-O3' to enable only conforming optimizations +// CHECK-OFAST-NO-STRICT-ALIASING: use '-O3 -ffast-math' for the same behavior, or '-O3' to enable only conforming optimizations // CHECK-OFAST-NO-STRICT-ALIASING: -cc1 // CHECK-OFAST-NO-STRICT-ALIASING: -relaxed-aliasing // CHECK-OFAST-NO-STRICT-ALIASING: -ffast-math // CHECK-OFAST-NO-STRICT-ALIASING: -Ofast // CHECK-OFAST-NO-STRICT-ALIASING: -vectorize-loops -// CHECK-OFAST-NO-VECTORIZE: use '-O3 -ffast math' for the same behavior, or '-O3' to enable only conforming optimizations +// CHECK-OFAST-NO-VECTORIZE: use '-O3 -ffast-math' for the same behavior, or '-O3' to enable only conforming optimizations // CHECK-OFAST-NO-VECTORIZE: -cc1 // CHECK-OFAST-NO-VECTORIZE-NOT: -relaxed-aliasing // CHECK-OFAST-NO-VECTORIZE: -ffast-math