diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-24 20:40:36 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-24 20:40:36 +0000 |
commit | d2490a91341b57df7a7e54f8a707e7ecde2eeb4e (patch) | |
tree | 52d2846d052172a17ff27e241f6158594c5395a1 /lib/CodeGen/CGExpr.cpp | |
parent | 8aa5f407d9e4787ff08bd66e1a2fe39be174fddc (diff) |
Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index add6dc5310..059b3827e6 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1518,7 +1518,8 @@ LValue CodeGenFunction::EmitNullInitializationLValue( //===--------------------------------------------------------------------===// -RValue CodeGenFunction::EmitCallExpr(const CallExpr *E) { +RValue CodeGenFunction::EmitCallExpr(const CallExpr *E, + ReturnValueSlot ReturnValue) { // Builtins never have block type. if (E->getCallee()->getType()->isBlockPointerType()) return EmitBlockCallExpr(E); @@ -1551,7 +1552,7 @@ RValue CodeGenFunction::EmitCallExpr(const CallExpr *E) { } llvm::Value *Callee = EmitScalarExpr(E->getCallee()); - return EmitCall(E->getCallee()->getType(), Callee, + return EmitCall(E->getCallee()->getType(), Callee, ReturnValue, E->arg_begin(), E->arg_end(), TargetDecl); } @@ -1713,6 +1714,7 @@ LValue CodeGenFunction::EmitPointerToDataMemberLValue(const FieldDecl *Field) { } RValue CodeGenFunction::EmitCall(QualType CalleeType, llvm::Value *Callee, + ReturnValueSlot ReturnValue, CallExpr::const_arg_iterator ArgBeg, CallExpr::const_arg_iterator ArgEnd, const Decl *TargetDecl) { @@ -1737,7 +1739,7 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, llvm::Value *Callee, CallingConvention = F->getCallingConv(); return EmitCall(CGM.getTypes().getFunctionInfo(ResultType, Args, CallingConvention), - Callee, ReturnValueSlot(), Args, TargetDecl); + Callee, ReturnValue, Args, TargetDecl); } LValue CodeGenFunction:: |