From 7fda20777785ae0076aa9f1c49ff6639cb7299ef Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Tue, 10 Sep 2013 05:14:39 +0000 Subject: 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 --- lib/CodeGen/CodeGenFunction.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') 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(FD)); } else if (FD->isDefaulted() && isa(FD) && - cast(FD)->isCopyAssignmentOperator()) { + (cast(FD)->isCopyAssignmentOperator() || + cast(FD)->isMoveAssignmentOperator())) { // Implicit copy-assignment gets the same special treatment as implicit // copy-constructors. emitImplicitAssignmentOperatorBody(Args); -- cgit v1.2.3