diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2013-09-10 05:14:39 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2013-09-10 05:14:39 +0000 |
| commit | 7fda20777785ae0076aa9f1c49ff6639cb7299ef (patch) | |
| tree | 14b69ef283ab57760189138c3670889cc8bdba73 /lib/CodeGen/CodeGenFunction.cpp | |
| parent | 39bd371610af27b073c792c54c6c28133329f6ad (diff) | |
| download | clang-7fda20777785ae0076aa9f1c49ff6639cb7299ef.tar.gz clang-7fda20777785ae0076aa9f1c49ff6639cb7299ef.tar.bz2 clang-7fda20777785ae0076aa9f1c49ff6639cb7299ef.tar.xz | |
Generate code for the move assignment operator using memcpy, the same as we do
for the copy assignment operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 20352f9f68..c9279a27f1 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -702,7 +702,8 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, // clones the body of the function call operator (but is actually static). EmitLambdaStaticInvokeFunction(cast<CXXMethodDecl>(FD)); } else if (FD->isDefaulted() && isa<CXXMethodDecl>(FD) && - cast<CXXMethodDecl>(FD)->isCopyAssignmentOperator()) { + (cast<CXXMethodDecl>(FD)->isCopyAssignmentOperator() || + cast<CXXMethodDecl>(FD)->isMoveAssignmentOperator())) { // Implicit copy-assignment gets the same special treatment as implicit // copy-constructors. emitImplicitAssignmentOperatorBody(Args); |
