AbortedChanges

Summary

  1. Merging r310983: ------------------------------------------------------------------------ r310983 | rsmith | 2017-08-15 18:49:53 -0700 (Tue, 15 Aug 2017) | 31 lines PR19668, PR23034: Fix handling of move constructors and deleted copy constructors when deciding whether classes should be passed indirectly. This fixes ABI differences between Clang and GCC: * Previously, Clang ignored the move constructor when making this determination. It now takes the move constructor into account, per https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may seem recent, but the ABI change was agreed on the Itanium C++ ABI list a long time ago). * Previously, Clang's behavior when the copy constructor was deleted was unstable -- depending on whether the lazy declaration of the copy constructor had been triggered, you might get different behavior. We now eagerly declare the copy constructor whenever its deletedness is unclear, and ignore deleted copy/move constructors when looking for a trivial such constructor. This also fixes an ABI difference between Clang and MSVC: * If the copy constructor would be implicitly deleted (but has not been lazily declared yet), for instance because the class has an rvalue reference member, we would pass it directly. We now pass such a class indirectly, matching MSVC. Based on a patch by Vassil Vassilev, which was based on a patch by Bernd Schmidt, which was based on a patch by Reid Kleckner! This is a re-commit of r310401, which was reverted in r310464 due to ARM failures (which should now be fixed). ------------------------------------------------------------------------
  2. Merging r311071: ------------------------------------------------------------------------ r311071 | eladcohen | 2017-08-17 01:06:36 -0700 (Thu, 17 Aug 2017) | 13 lines [SelectionDAG] Teach the vector-types operand scalarizer about SETCC When v1i1 is legal (e.g. AVX512) the legalizer can reach a case where a v1i1 SETCC with an illgeal vector type operand wasn't scalarized (since v1i1 is legal) but its operands does have to be scalarized. This used to assert because SETCC was missing from the vector operand scalarizer. This patch attemps to teach the legalizer to handle these cases by scalazring the operands, converting the node into a scalar SETCC node. Differential revision: https://reviews.llvm.org/D36651 ------------------------------------------------------------------------
  3. Merging r310990: ------------------------------------------------------------------------ r310990 | mstorsjo | 2017-08-15 22:18:36 -0700 (Tue, 15 Aug 2017) | 18 lines [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386 Hook up the -k option (that in the original GNU dlltool removes the @n suffix from the symbol that the final executable ends up linked to). In llvm-dlltool, make sure that functions end up with the undecorate name type if this option is set and they are decorated. In mingw, when creating import libraries from def files instead of creating an import library as a side effect of linking a DLL, the symbol names in the def contain the stdcall/fastcall decoration (but no leading underscore). By setting the undecorate name type, a linker linking to the import library will omit the decoration from the DLL import entry. With this in place, mingw-w64 for i386 built with llvm-dlltool/clang produces import libraries that actually work. Differential Revision: https://reviews.llvm.org/D36548 ------------------------------------------------------------------------
Revision 311410 by hans:
Merging r310983:
------------------------------------------------------------------------
r310983 | rsmith | 2017-08-15 18:49:53 -0700 (Tue, 15 Aug 2017) | 31 lines

PR19668, PR23034: Fix handling of move constructors and deleted copy
constructors when deciding whether classes should be passed indirectly.

This fixes ABI differences between Clang and GCC:

* Previously, Clang ignored the move constructor when making this
   determination. It now takes the move constructor into account, per
   https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may
   seem recent, but the ABI change was agreed on the Itanium C++ ABI
   list a long time ago).

* Previously, Clang's behavior when the copy constructor was deleted
   was unstable -- depending on whether the lazy declaration of the
   copy constructor had been triggered, you might get different behavior.
   We now eagerly declare the copy constructor whenever its deletedness
   is unclear, and ignore deleted copy/move constructors when looking for
   a trivial such constructor.

This also fixes an ABI difference between Clang and MSVC:

* If the copy constructor would be implicitly deleted (but has not been
   lazily declared yet), for instance because the class has an rvalue
   reference member, we would pass it directly. We now pass such a class
   indirectly, matching MSVC.

Based on a patch by Vassil Vassilev, which was based on a patch by Bernd
Schmidt, which was based on a patch by Reid Kleckner!

This is a re-commit of r310401, which was reverted in r310464 due to ARM
failures (which should now be fixed).

------------------------------------------------------------------------
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/branches/release_50clang.src
The file was modified/cfe/branches/release_50/include/clang/AST/DeclCXX.hclang.src/include/clang/AST/DeclCXX.h
The file was modified/cfe/branches/release_50/lib/AST/ASTImporter.cppclang.src/lib/AST/ASTImporter.cpp
The file was modified/cfe/branches/release_50/lib/AST/DeclCXX.cppclang.src/lib/AST/DeclCXX.cpp
The file was modified/cfe/branches/release_50/lib/CodeGen/CGCXXABI.cppclang.src/lib/CodeGen/CGCXXABI.cpp
The file was modified/cfe/branches/release_50/lib/CodeGen/ItaniumCXXABI.cppclang.src/lib/CodeGen/ItaniumCXXABI.cpp
The file was modified/cfe/branches/release_50/lib/CodeGen/MicrosoftCXXABI.cppclang.src/lib/CodeGen/MicrosoftCXXABI.cpp
The file was modified/cfe/branches/release_50/lib/Sema/SemaDeclCXX.cppclang.src/lib/Sema/SemaDeclCXX.cpp
The file was modified/cfe/branches/release_50/lib/Serialization/ASTReaderDecl.cppclang.src/lib/Serialization/ASTReaderDecl.cpp
The file was modified/cfe/branches/release_50/lib/Serialization/ASTWriter.cppclang.src/lib/Serialization/ASTWriter.cpp
The file was modified/cfe/branches/release_50/test/CodeGenCXX/uncopyable-args.cppclang.src/test/CodeGenCXX/uncopyable-args.cpp
The file was modified/cfe/branches/release_50/unittests/ASTMatchers/ASTMatchersNarrowingTest.cppclang.src/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
Revision 311409 by hans:
Merging r311071:
------------------------------------------------------------------------
r311071 | eladcohen | 2017-08-17 01:06:36 -0700 (Thu, 17 Aug 2017) | 13 lines

[SelectionDAG] Teach the vector-types operand scalarizer about SETCC

When v1i1 is legal (e.g. AVX512) the legalizer can reach
a case where a v1i1 SETCC with an illgeal vector type operand
wasn't scalarized (since v1i1 is legal) but its operands does
have to be scalarized. This used to assert because SETCC was
missing from the vector operand scalarizer.

This patch attemps to teach the legalizer to handle these cases
by scalazring the operands, converting the node into a scalar
SETCC node.

Differential revision: https://reviews.llvm.org/D36651
------------------------------------------------------------------------
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/branches/release_50llvm.src
The file was modified/llvm/branches/release_50/lib/CodeGen/SelectionDAG/LegalizeTypes.hllvm.src/lib/CodeGen/SelectionDAG/LegalizeTypes.h
The file was modified/llvm/branches/release_50/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cppllvm.src/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
The file was added/llvm/branches/release_50/test/CodeGen/X86/pr34177.llllvm.src/test/CodeGen/X86/pr34177.ll
Revision 311408 by hans:
Merging r310990:
------------------------------------------------------------------------
r310990 | mstorsjo | 2017-08-15 22:18:36 -0700 (Tue, 15 Aug 2017) | 18 lines

[llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386

Hook up the -k option (that in the original GNU dlltool removes the
@n suffix from the symbol that the final executable ends up linked to).

In llvm-dlltool, make sure that functions end up with the undecorate
name type if this option is set and they are decorated. In mingw, when
creating import libraries from def files instead of creating an import
library as a side effect of linking a DLL, the symbol names in the def
contain the stdcall/fastcall decoration (but no leading underscore).

By setting the undecorate name type, a linker linking to the import
library will omit the decoration from the DLL import entry.

With this in place, mingw-w64 for i386 built with llvm-dlltool/clang
produces import libraries that actually work.

Differential Revision: https://reviews.llvm.org/D36548
------------------------------------------------------------------------
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/branches/release_50llvm.src
The file was modified/llvm/branches/release_50/lib/Object/COFFModuleDefinition.cppllvm.src/lib/Object/COFFModuleDefinition.cpp
The file was modified/llvm/branches/release_50/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cppllvm.src/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
The file was modified/llvm/branches/release_50/lib/ToolDrivers/llvm-dlltool/Options.tdllvm.src/lib/ToolDrivers/llvm-dlltool/Options.td
The file was added/llvm/branches/release_50/test/DllTool/coff-decorated.defllvm.src/test/DllTool/coff-decorated.def