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?
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? On Wed, May 7, 2014 at 5:52 PM, Reid Kleckner <r...@google.com> wrote: > Hi rsmith, majnemer, > > This affects both the Itanium and Microsoft C++ ABIs. > > Our C++ ABI code was checking if the object had a non-trivial copy ctor > or non-trivial dtor. Now we check if there are any trivial, non-deleted > copy or move ctors before passing an argument in registers. > > On x86 Windows, we can mostly use the same logic, where we use inalloca > instead of passing by address. However, on Win64, there are register > parameters, and we have to do what MSVC does. MSVC ignores the presence > of non-trivial move constructors and only considers the presence of > non-trivial or deleted copy constructors. If a non-trivial or deleted > copy ctor is present, it passes the argument indirectly. > > This change fixes bugs and makes us more ABI compatible with both GCC > and MSVC. > > Fixes PR19668. > > http://reviews.llvm.org/D3660 > > Files: > lib/CodeGen/CGCXXABI.cpp > lib/CodeGen/CGCXXABI.h > lib/CodeGen/ItaniumCXXABI.cpp > lib/CodeGen/MicrosoftCXXABI.cpp > test/CodeGenCXX/uncopyable-args.cpp >
_______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits