r369148 - [Test Commit] Fix typo in diagtool.rst

2019-08-16 Thread Troy A. Johnson via cfe-commits
Author: troyj
Date: Fri Aug 16 13:26:48 2019
New Revision: 369148

URL: http://llvm.org/viewvc/llvm-project?rev=369148&view=rev
Log:
[Test Commit] Fix typo in diagtool.rst

Test commit after obtaining commit access.

Modified:
cfe/trunk/docs/CommandGuide/diagtool.rst

Modified: cfe/trunk/docs/CommandGuide/diagtool.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/CommandGuide/diagtool.rst?rev=369148&r1=369147&r2=369148&view=diff
==
--- cfe/trunk/docs/CommandGuide/diagtool.rst (original)
+++ cfe/trunk/docs/CommandGuide/diagtool.rst Fri Aug 16 13:26:48 2019
@@ -9,7 +9,7 @@ SYNOPSIS
 DESCRIPTION
 ---
 
-:program:`diagtool` is a combination of four tool for dealing with diagnostics 
in :program:`clang`.
+:program:`diagtool` is a combination of four tools for dealing with 
diagnostics in :program:`clang`.
 
 SUBCOMMANDS
 ---


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r369152 - [X86] Support -mlong-double-80

2019-08-16 Thread Troy A. Johnson via cfe-commits
Author: troyj
Date: Fri Aug 16 14:00:22 2019
New Revision: 369152

URL: http://llvm.org/viewvc/llvm-project?rev=369152&view=rev
Log:
[X86] Support -mlong-double-80

Add an option group for all of the -mlong-double-* options and make
-mlong-double-80 restore the default long double behavior for X86.  The
motivations are that GNU accepts the -mlong-double-80 option and that complex
Makefiles often need a way of undoing earlier options. Prior to this commit, if
one chooses 64-bit or 128-bit long double for X86, there is no way to undo that
choice and restore the 80-bit behavior.

Differential Revision: https://reviews.llvm.org/D66055

Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
cfe/trunk/test/Driver/mlong-double-128.c

Modified: cfe/trunk/include/clang/Driver/Options.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=369152&r1=369151&r2=369152&view=diff
==
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Fri Aug 16 14:00:22 2019
@@ -2040,9 +2040,14 @@ def malign_jumps_EQ : Joined<["-"], "mal
 def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, 
Group;
 def mlong_calls : Flag<["-"], "mlong-calls">, Group,
   HelpText<"Generate branches with extended addressability, usually via 
indirect jumps.">;
-def mlong_double_64 : Flag<["-"], "mlong-double-64">, Group, 
Flags<[CC1Option]>,
+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]>,
   HelpText<"Force long double to be 64 bits">;
-def mlong_double_128 : Flag<["-"], "mlong-double-128">, Group, 
Flags<[CC1Option]>,
+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]>,
   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">;

Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=369152&r1=369151&r2=369152&view=diff
==
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Fri Aug 16 14:00:22 2019
@@ -4057,11 +4057,13 @@ void Clang::ConstructJob(Compilation &C,
 
   RenderFloatingPointOptions(TC, D, OFastEnabled, Args, CmdArgs);
 
-  if (Arg *A = Args.getLastArg(options::OPT_mlong_double_64,
-   options::OPT_mlong_double_128)) {
+  if (Arg *A = Args.getLastArg(options::OPT_LongDouble_Group)) {
 if (TC.getArch() == llvm::Triple::x86 ||
-TC.getArch() == llvm::Triple::x86_64 ||
-TC.getArch() == llvm::Triple::ppc || TC.getTriple().isPPC64())
+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))
   A->render(Args, CmdArgs);
 else
   D.Diag(diag::err_drv_unsupported_opt_for_target)

Modified: cfe/trunk/test/Driver/mlong-double-128.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mlong-double-128.c?rev=369152&r1=369151&r2=369152&view=diff
==
--- cfe/trunk/test/Driver/mlong-double-128.c (original)
+++ cfe/trunk/test/Driver/mlong-double-128.c Fri Aug 16 14:00:22 2019
@@ -2,10 +2,14 @@
 // 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 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
 
 // 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'

r369170 - Revert "[X86] Support -mlong-double-80"

2019-08-16 Thread Troy A. Johnson via cfe-commits
Author: troyj
Date: Fri Aug 16 16:18:22 2019
New Revision: 369170

URL: http://llvm.org/viewvc/llvm-project?rev=369170&view=rev
Log:
Revert "[X86] Support -mlong-double-80"

This reverts commit 250aafa2c4a1bc2395edfe8d4365545bbe56fffe.
Caused buildbot failures -- still investigating.

Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
cfe/trunk/test/Driver/mlong-double-128.c

Modified: cfe/trunk/include/clang/Driver/Options.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=369170&r1=369169&r2=369170&view=diff
==
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Fri Aug 16 16:18:22 2019
@@ -2040,14 +2040,9 @@ def malign_jumps_EQ : Joined<["-"], "mal
 def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, 
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">;

Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=369170&r1=369169&r2=369170&view=diff
==
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Fri Aug 16 16:18:22 2019
@@ -4057,13 +4057,11 @@ void Clang::ConstructJob(Compilation &C,
 
   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)

Modified: cfe/trunk/test/Driver/mlong-double-128.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mlong-double-128.c?rev=369170&r1=369169&r2=369170&view=diff
==
--- cfe/trunk/test/Driver/mlong-double-128.c (original)
+++ cfe/trunk/test/Driver/mlong-double-128.c Fri Aug 16 16:18:22 2019
@@ -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'


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r369183 - [X86] Support -mlong-double-80

2019-08-16 Thread Troy A. Johnson via cfe-commits
Author: troyj
Date: Fri Aug 16 21:20:24 2019
New Revision: 369183

URL: http://llvm.org/viewvc/llvm-project?rev=369183&view=rev
Log:
[X86] Support -mlong-double-80

Add an option group for all of the -mlong-double-* options and make
-mlong-double-80 restore the default long double behavior for X86.  The
motivations are that GNU accepts the -mlong-double-80 option and that complex
Makefiles often need a way of undoing earlier options. Prior to this commit, if
one chooses 64-bit or 128-bit long double for X86, there is no way to undo that
choice and restore the 80-bit behavior.

Differential Revision: https://reviews.llvm.org/D66055

Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
cfe/trunk/test/Driver/mlong-double-128.c

Modified: cfe/trunk/include/clang/Driver/Options.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=369183&r1=369182&r2=369183&view=diff
==
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Fri Aug 16 21:20:24 2019
@@ -2040,9 +2040,14 @@ def malign_jumps_EQ : Joined<["-"], "mal
 def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, 
Group;
 def mlong_calls : Flag<["-"], "mlong-calls">, Group,
   HelpText<"Generate branches with extended addressability, usually via 
indirect jumps.">;
-def mlong_double_64 : Flag<["-"], "mlong-double-64">, Group, 
Flags<[CC1Option]>,
+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]>,
   HelpText<"Force long double to be 64 bits">;
-def mlong_double_128 : Flag<["-"], "mlong-double-128">, Group, 
Flags<[CC1Option]>,
+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]>,
   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">;

Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=369183&r1=369182&r2=369183&view=diff
==
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Fri Aug 16 21:20:24 2019
@@ -4057,11 +4057,12 @@ void Clang::ConstructJob(Compilation &C,
 
   RenderFloatingPointOptions(TC, D, OFastEnabled, Args, CmdArgs);
 
-  if (Arg *A = Args.getLastArg(options::OPT_mlong_double_64,
-   options::OPT_mlong_double_128)) {
+  if (Arg *A = Args.getLastArg(options::OPT_LongDouble_Group)) {
 if (TC.getArch() == llvm::Triple::x86 ||
-TC.getArch() == llvm::Triple::x86_64 ||
-TC.getArch() == llvm::Triple::ppc || TC.getTriple().isPPC64())
+TC.getArch() == llvm::Triple::x86_64)
+  A->render(Args, CmdArgs);
+else if ((TC.getArch() == llvm::Triple::ppc || TC.getTriple().isPPC64()) &&
+ (A->getOption().getID() != options::OPT_mlong_double_80))
   A->render(Args, CmdArgs);
 else
   D.Diag(diag::err_drv_unsupported_opt_for_target)

Modified: cfe/trunk/test/Driver/mlong-double-128.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mlong-double-128.c?rev=369183&r1=369182&r2=369183&view=diff
==
--- cfe/trunk/test/Driver/mlong-double-128.c (original)
+++ cfe/trunk/test/Driver/mlong-double-128.c Fri Aug 16 21:20:24 2019
@@ -2,10 +2,14 @@
 // 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 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-128 
/dev/null
+// RUN: %clang -target x86_64-linux-musl -c -### %s -mlong-double-80 
-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'