diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-08-23 03:46:30 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-08-23 03:46:30 +0000 |
commit | 8f2926b73ed635afecd020da787af6a837601a2b (patch) | |
tree | 3bd447986dfc84c49d567dd60b5a7f2434901c2d /lib/CodeGen/CGExprAgg.cpp | |
parent | 9299f3fa85796613cc787a2062c9562d07c8613e (diff) |
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
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r-- | lib/CodeGen/CGExprAgg.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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()); |