]> granicus.if.org Git - clang/commit
Revert Itanium parts of "Don't copy objects with trivial, deleted copy ctors"
authorReid Kleckner <reid@kleckner.net>
Thu, 15 May 2014 01:26:32 +0000 (01:26 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 15 May 2014 01:26:32 +0000 (01:26 +0000)
commitfde5f97ad7d92d5939b772b074991f169cbd7bf5
treec49837ec0a5600baad399fbe9b97888375246856
parent8454a4b9373bca5d2a8f596ef1c33826171729bd
Revert Itanium parts of "Don't copy objects with trivial, deleted copy ctors"

This undoes half of r208786.

It had problems with lazily declared special members in cases like this:
  struct A {
    A();
    A &operator=(A &&o);
    void *p;
  };
  void foo(A);
  void bar() {
    foo({});
  }

In this case, the copy and move constructors are implicitly deleted.
However, Clang doesn't eagerly declare the copy ctor in the AST, so we
pass the struct in registers.  Furthermore, GCC passes this in registers
even though this class should be uncopyable.

Revert this for now until the dust settles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208836 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCXXABI.cpp
lib/CodeGen/ItaniumCXXABI.cpp
test/CodeGenCXX/uncopyable-args.cpp