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/CGExprScalar.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/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 8228dd6d84..ddf1421b98 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -131,7 +131,6 @@ public: return llvm::ConstantInt::get(EC->getInitVal()); return EmitLoadOfLValue(E); } - Value *VisitObjCMessageExpr(ObjCMessageExpr *E); Value *VisitObjCSelectorExpr(ObjCSelectorExpr *E); Value *VisitObjCProtocolExpr(ObjCProtocolExpr *E); Value *VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) { return EmitLoadOfLValue(E);} @@ -186,7 +185,11 @@ public: Value *VisitCallExpr(const CallExpr *E) { return CGF.EmitCallExpr(E).getScalarVal(); } - + + Value *VisitObjCMessageExpr(ObjCMessageExpr *E) { + return CGF.EmitObjCMessageExpr(E).getScalarVal(); + } + Value *VisitStmtExpr(const StmtExpr *E); // Unary Operators. @@ -466,10 +469,6 @@ Value *ScalarExprEmitter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) { return Builder.CreateShuffleVector(V1, V2, SV, "shuffle"); } -Value *ScalarExprEmitter::VisitObjCMessageExpr(ObjCMessageExpr *E) { - return CGF.EmitObjCMessageExpr(E); -} - Value *ScalarExprEmitter::VisitObjCSelectorExpr(ObjCSelectorExpr *E) { return CGF.EmitObjCSelectorExpr(E); } |