From 8f2926b73ed635afecd020da787af6a837601a2b Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sat, 23 Aug 2008 03:46:30 +0000 Subject: Trim CGObjCRuntime::GenerateMessageSend[Super] - Returns an RValue. - Reduced to only taking the CodeGenFunction, Expr, and Receiver. - Becomes responsible for emitting the arguments. Add CodeGenFunction::EmitCallExprExt - Takes optional extra arguments to insert at the head of the call. - This allows the Obj-C runtimes to call into this and isolates the argument and call instruction generation code to one place. Upshot is that we now pass structures (more) correctly. Also, fix one aspect of generating methods which take structure arguments (for NeXT). This probably needs to be merged with the SetFunctionAttributes code in CodeGenModule.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55223 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprAgg.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExprAgg.cpp') diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index 019d7be50c..bc6af1251e 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -202,10 +202,12 @@ void AggExprEmitter::VisitCallExpr(const CallExpr *E) { } void AggExprEmitter::VisitObjCMessageExpr(ObjCMessageExpr *E) { - RValue RV = RValue::getAggregate(CGF.EmitObjCMessageExpr(E)); + RValue RV = CGF.EmitObjCMessageExpr(E); + assert(RV.isAggregate() && "Return value must be aggregate value!"); // If the result is ignored, don't copy from the value. if (DestPtr == 0) + // FIXME: If the source is volatile, we must read from it. return; EmitAggregateCopy(DestPtr, RV.getAggregateAddr(), E->getType()); -- cgit v1.2.3