summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprCXX.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-08-25 21:58:56 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-08-25 21:58:56 +0000
commit525bf650ccc50b4b574f48875ea0429ec6ed1175 (patch)
treeca7e49977f3e36dd4611caa35d44b93b12f34cf0 /clang/lib/CodeGen/CGExprCXX.cpp
parent1767e115945f9f18f3032433887bb9b231edb5ce (diff)
downloadbcm5719-llvm-525bf650ccc50b4b574f48875ea0429ec6ed1175.tar.gz
bcm5719-llvm-525bf650ccc50b4b574f48875ea0429ec6ed1175.zip
Pass actual CXXConstructExpr instead of argument iterators
into EmitSynthesizedCXXCopyCtorCall. No functionality change. llvm-svn: 216410
Diffstat (limited to 'clang/lib/CodeGen/CGExprCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprCXX.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp
index 25ca4df3a15..6cec0b8fd25 100644
--- a/clang/lib/CodeGen/CGExprCXX.cpp
+++ b/clang/lib/CodeGen/CGExprCXX.cpp
@@ -154,13 +154,13 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE,
EmitAggregateAssign(This, RHS, CE->getType());
return RValue::get(This);
}
-
- if (isa<CXXConstructorDecl>(MD) &&
+
+ if (isa<CXXConstructorDecl>(MD) &&
cast<CXXConstructorDecl>(MD)->isCopyOrMoveConstructor()) {
// Trivial move and copy ctor are the same.
+ assert(CE->getNumArgs() == 1 && "unexpected argcount for trivial ctor");
llvm::Value *RHS = EmitLValue(*CE->arg_begin()).getAddress();
- EmitSynthesizedCXXCopyCtorCall(cast<CXXConstructorDecl>(MD), This, RHS,
- CE->arg_begin(), CE->arg_end());
+ EmitAggregateCopy(This, RHS, CE->arg_begin()->getType());
return RValue::get(This);
}
llvm_unreachable("unknown trivial member function");
@@ -452,7 +452,7 @@ CodeGenFunction::EmitSynthesizedCXXCopyCtor(llvm::Value *Dest,
assert(!getContext().getAsConstantArrayType(E->getType())
&& "EmitSynthesizedCXXCopyCtor - Copied-in Array");
- EmitSynthesizedCXXCopyCtorCall(CD, Dest, Src, E->arg_begin(), E->arg_end());
+ EmitSynthesizedCXXCopyCtorCall(CD, Dest, Src, E);
}
static CharUnits CalculateCookiePadding(CodeGenFunction &CGF,
OpenPOWER on IntegriCloud