summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-30 03:02:31 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-30 03:02:31 +0000
commit19cd87eb5fb3c197e631ce08fd52c446c4d4e8f1 (patch)
tree3f19c67a800f12f6ecc608d7f5d263d55ad7d375 /lib/CodeGen/CodeGenFunction.h
parent0e194ddd0a5b5ce5d08ebcf8fb71cd41d02c1933 (diff)
downloadclang-19cd87eb5fb3c197e631ce08fd52c446c4d4e8f1.tar.gz
clang-19cd87eb5fb3c197e631ce08fd52c446c4d4e8f1.tar.bz2
clang-19cd87eb5fb3c197e631ce08fd52c446c4d4e8f1.tar.xz
Refactor handling of calls:
- Added CodeGenFunction::EmitCall which just takes the callee, return type, and a list of (Value*,QualType) pairs. - Added CodeGenFunction::EmitCallArg which handles emitting code for a call argument and turning it into an appropriate (Value*,QualType) pair. - Changed Objective-C runtime interface so that the actual emission of arguments for message sends is (once again) done in the code to emit a message send. No intended functionality change, this is prep work for better ABI support and for Objective-C property setter support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index d1f3a6a539..e00c66552f 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -299,6 +299,12 @@ public:
// Scalar Expression Emission
//===--------------------------------------------------------------------===//
+ typedef llvm::SmallVector<std::pair<llvm::Value*, QualType>, 16> CallArgList;
+ void EmitCallArg(const Expr *E, CallArgList &Args);
+ RValue EmitCall(llvm::Value *Callee,
+ QualType ResultType,
+ const CallArgList &Args);
+
RValue EmitCallExpr(const CallExpr *E);
RValue EmitCallExpr(Expr *FnExpr, CallExpr::const_arg_iterator ArgBeg,
@@ -308,13 +314,6 @@ 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);