From: Troy A. Johnson Date: Fri, 16 Aug 2019 23:18:22 +0000 (+0000) Subject: Revert "[X86] Support -mlong-double-80" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14c9dc140aed396d5ea1a5e3cee18d261fde0894;p=clang Revert "[X86] Support -mlong-double-80" This reverts commit 250aafa2c4a1bc2395edfe8d4365545bbe56fffe. Caused buildbot failures -- still investigating. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369170 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index baf7219aba..0f2c314a33 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -2040,14 +2040,9 @@ def malign_jumps_EQ : Joined<["-"], "malign-jumps=">, Group, Group; def mlong_calls : Flag<["-"], "mlong-calls">, Group, HelpText<"Generate branches with extended addressability, usually via indirect jumps.">; -def LongDouble_Group : OptionGroup<"">, Group, - DocName<"Long double flags">, - DocBrief<[{Selects the long double implementation}]>; -def mlong_double_64 : Flag<["-"], "mlong-double-64">, Group, Flags<[CC1Option]>, +def mlong_double_64 : Flag<["-"], "mlong-double-64">, Group, Flags<[CC1Option]>, HelpText<"Force long double to be 64 bits">; -def mlong_double_80 : Flag<["-"], "mlong-double-80">, Group, Flags<[CC1Option]>, - HelpText<"Force long double to be 80 bits, padded to 128 bits for storage">; -def mlong_double_128 : Flag<["-"], "mlong-double-128">, Group, Flags<[CC1Option]>, +def mlong_double_128 : Flag<["-"], "mlong-double-128">, Group, Flags<[CC1Option]>, HelpText<"Force long double to be 128 bits">; def mno_long_calls : Flag<["-"], "mno-long-calls">, Group, HelpText<"Restore the default behaviour of not generating long calls">; diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp index 11f75b6874..2e9ccca4b2 100644 --- a/lib/Driver/ToolChains/Clang.cpp +++ b/lib/Driver/ToolChains/Clang.cpp @@ -4057,13 +4057,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, RenderFloatingPointOptions(TC, D, OFastEnabled, Args, CmdArgs); - if (Arg *A = Args.getLastArg(options::OPT_LongDouble_Group)) { + if (Arg *A = Args.getLastArg(options::OPT_mlong_double_64, + options::OPT_mlong_double_128)) { if (TC.getArch() == llvm::Triple::x86 || - TC.getArch() == llvm::Triple::x86_64) - A->render(Args, CmdArgs); - else if ((TC.getArch() == llvm::Triple::ppc || - TC.getArch() == TC.getTriple().isPPC64()) && - (A->getOption().getID() != options::OPT_mlong_double_80)) + TC.getArch() == llvm::Triple::x86_64 || + TC.getArch() == llvm::Triple::ppc || TC.getTriple().isPPC64()) A->render(Args, CmdArgs); else D.Diag(diag::err_drv_unsupported_opt_for_target) diff --git a/test/Driver/mlong-double-128.c b/test/Driver/mlong-double-128.c index d4c12dbe26..ae76265a3b 100644 --- a/test/Driver/mlong-double-128.c +++ b/test/Driver/mlong-double-128.c @@ -2,14 +2,10 @@ // RUN: %clang -target powerpc64-pc-freebsd12 -c -### %s -mlong-double-128 2>&1 | FileCheck %s // RUN: %clang -target powerpc64le-linux-musl -c -### %s -mlong-double-128 2>&1 | FileCheck %s // RUN: %clang -target i686-linux-gnu -c -### %s -mlong-double-128 2>&1 | FileCheck %s - -// RUN: %clang -target x86_64-linux-musl -c -### %s -mlong-double-128 -mlong-double-80 2>&1 | FileCheck --implicit-check-not=-mlong-double- /dev/null -// RUN: %clang -target x86_64-linux-musl -c -### %s -mlong-double-80 -mlong-double-128 2>&1 | FileCheck %s +// RUN: %clang -target x86_64-linux-musl -c -### %s -mlong-double-128 2>&1 | FileCheck %s // CHECK: "-mlong-double-128" // RUN: %clang -target aarch64 -c -### %s -mlong-double-128 2>&1 | FileCheck --check-prefix=ERR %s -// RUN: %clang -target powerpc -c -### %s -mlong-double-80 2>&1 | FileCheck --check-prefix=ERR2 %s // ERR: error: unsupported option '-mlong-double-128' for target 'aarch64' -// ERR2: error: unsupported option '-mlong-double-80' for target 'powerpc-linux-musl'