Re-land "[MS] Overhaul how clang passes overaligned args on x86_32"
authorReid Kleckner <rnk@google.com>
Wed, 12 Feb 2020 00:03:26 +0000 (16:03 -0800)
committerReid Kleckner <rnk@google.com>
Wed, 12 Feb 2020 00:49:28 +0000 (16:49 -0800)
commit2c6a3896ab1de706389f27c921cf58084650f439
treef9216276231989a9465ff73191659d95bc71cf0a
parent413307d4560441b47261ced5db5f8e29c8811277
Re-land "[MS] Overhaul how clang passes overaligned args on x86_32"

This brings back 2af74e27ed7d0832cbdde9cb969aaca7a42e99f9 and reverts
eaabaf7e04fe98990a8177a3e053346395efde1c.

The changes were correct, the code that was broken contained an ODR
violation that assumed that these types are passed equivalently:
  struct alignas(uint64_t) Wrapper { uint64_t P };
  void f(uint64_t p);
  void f(Wrapper p);

MSVC does not pass them the same way, and so clang-cl should not pass
them the same way either.
clang/include/clang/CodeGen/CGFunctionInfo.h
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGen/x86_32-arguments-win32.c
clang/test/CodeGenCXX/inalloca-overaligned.cpp [new file with mode: 0644]
clang/test/CodeGenCXX/inalloca-vector.cpp [new file with mode: 0644]