aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-23 03:46:30 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-23 03:46:30 +0000
commit8f2926b73ed635afecd020da787af6a837601a2b (patch)
tree3bd447986dfc84c49d567dd60b5a7f2434901c2d /lib/CodeGen/CodeGenFunction.h
parent9299f3fa85796613cc787a2062c9562d07c8613e (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/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index f13cba2a44..37b242e29e 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -24,13 +24,13 @@
#include <vector>
#include <map>
+#include "CGValue.h"
+
namespace llvm {
class BasicBlock;
class Module;
}
-#include "CGValue.h"
-
namespace clang {
class ASTContext;
class Decl;
@@ -286,6 +286,13 @@ public:
CallExpr::const_arg_iterator ArgBeg,
CallExpr::const_arg_iterator ArgEnd);
+ RValue EmitCallExprExt(llvm::Value *Callee,
+ QualType ResultType,
+ CallExpr::const_arg_iterator ArgBeg,
+ CallExpr::const_arg_iterator ArgEnd,
+ llvm::Value **ExtraArgs,
+ unsigned NumExtraArgs);
+
RValue EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E);
llvm::Value *EmitX86BuiltinExpr(unsigned BuiltinID, const CallExpr *E);
@@ -298,7 +305,7 @@ public:
llvm::Value *EmitObjCProtocolExpr(const ObjCProtocolExpr *E);
llvm::Value *EmitObjCStringLiteral(const ObjCStringLiteral *E);
llvm::Value *EmitObjCSelectorExpr(const ObjCSelectorExpr *E);
- llvm::Value *EmitObjCMessageExpr(const ObjCMessageExpr *E);
+ RValue EmitObjCMessageExpr(const ObjCMessageExpr *E);
//===--------------------------------------------------------------------===//