diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-03-10 01:47:22 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-03-10 01:47:22 +0000 |
commit | 007cb6df582f30ca9299d8b61357e9e45557c262 (patch) | |
tree | f64348e10d5d3ee78c3833e0b54f73c8e433d550 /clang/lib/CodeGen/CGClass.cpp | |
parent | aaabea0636eb5177b4b26f9d932268dc7f677b08 (diff) | |
download | bcm5719-llvm-007cb6df582f30ca9299d8b61357e9e45557c262.tar.gz bcm5719-llvm-007cb6df582f30ca9299d8b61357e9e45557c262.zip |
Revert r326946. It caused stack overflows by significantly increasing the size of a CallArgList.
llvm-svn: 327195
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 4ba5c06099a..56bd25025f5 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -2077,8 +2077,7 @@ void CodeGenFunction::EmitCXXConstructorCall(const CXXConstructorDecl *D, assert(Args.size() == 2 && "unexpected argcount for trivial ctor"); QualType SrcTy = D->getParamDecl(0)->getType().getNonReferenceType(); - Address Src(Args[1].getRValue(*this).getScalarVal(), - getNaturalTypeAlignment(SrcTy)); + Address Src(Args[1].RV.getScalarVal(), getNaturalTypeAlignment(SrcTy)); LValue SrcLVal = MakeAddrLValue(Src, SrcTy); QualType DestTy = getContext().getTypeDeclType(ClassDecl); LValue DestLVal = MakeAddrLValue(This, DestTy); @@ -2132,7 +2131,8 @@ void CodeGenFunction::EmitInheritedCXXConstructorCall( const CXXConstructorDecl *D, bool ForVirtualBase, Address This, bool InheritedFromVBase, const CXXInheritedCtorInitExpr *E) { CallArgList Args; - CallArg ThisArg(RValue::get(This.getPointer()), D->getThisType(getContext())); + CallArg ThisArg(RValue::get(This.getPointer()), D->getThisType(getContext()), + /*NeedsCopy=*/false); // Forward the parameters. if (InheritedFromVBase && @@ -2196,7 +2196,7 @@ void CodeGenFunction::EmitInlinedInheritingCXXConstructorCall( assert(Args.size() >= Params.size() && "too few arguments for call"); for (unsigned I = 0, N = Args.size(); I != N; ++I) { if (I < Params.size() && isa<ImplicitParamDecl>(Params[I])) { - const RValue &RV = Args[I].getRValue(*this); + const RValue &RV = Args[I].RV; assert(!RV.isComplex() && "complex indirect params not supported"); ParamValue Val = RV.isScalar() ? ParamValue::forDirect(RV.getScalarVal()) |