<div dir="ltr">Richard, you had concerns that this loop over ctors was incorrect, and that I should really be making some change to CXXRecordDecl::DefinitionData.  Can you imagine some test cases that might be problematic?<div>
<br></div><div>If so, do you think it's worth pursuing a more complete fix that updates the flags, or is it OK to accept this as an incremental fix?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, May 7, 2014 at 5:52 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi rsmith, majnemer,<br>
<br>
This affects both the Itanium and Microsoft C++ ABIs.<br>
<br>
Our C++ ABI code was checking if the object had a non-trivial copy ctor<br>
or non-trivial dtor.  Now we check if there are any trivial, non-deleted<br>
copy or move ctors before passing an argument in registers.<br>
<br>
On x86 Windows, we can mostly use the same logic, where we use inalloca<br>
instead of passing by address.  However, on Win64, there are register<br>
parameters, and we have to do what MSVC does.  MSVC ignores the presence<br>
of non-trivial move constructors and only considers the presence of<br>
non-trivial or deleted copy constructors.  If a non-trivial or deleted<br>
copy ctor is present, it passes the argument indirectly.<br>
<br>
This change fixes bugs and makes us more ABI compatible with both GCC<br>
and MSVC.<br>
<br>
Fixes PR19668.<br>
<br>
<a href="http://reviews.llvm.org/D3660" target="_blank">http://reviews.llvm.org/D3660</a><br>
<br>
Files:<br>
  lib/CodeGen/CGCXXABI.cpp<br>
  lib/CodeGen/CGCXXABI.h<br>
  lib/CodeGen/ItaniumCXXABI.cpp<br>
  lib/CodeGen/MicrosoftCXXABI.cpp<br>
  test/CodeGenCXX/uncopyable-args.cpp<br>
</blockquote></div><br></div>