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 | b39be1f38eddb47f2898fed512901e6f27aeb45e (patch) | |
tree | 239880ff0e5a81f312819700cb0f9b4526ec910b /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | e2622c2accc2e865f31a497b62f9bfebf84690f4 (diff) | |
download | bcm5719-llvm-b39be1f38eddb47f2898fed512901e6f27aeb45e.tar.gz bcm5719-llvm-b39be1f38eddb47f2898fed512901e6f27aeb45e.zip |
Generate code for the move assignment operator using memcpy, the same as we do
for the copy assignment operator.
llvm-svn: 190385
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 20352f9f685..c9279a27f11 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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); |