From 46f45b9bec4a265ad8400a538e5ec3a5683617f1 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 9 Sep 2008 01:06:48 +0000 Subject: Change CodeGen to emit calls using (RValue,Type) list: - Add CodeGenFunction::EmitAnyExprToTemp o Like EmitAnyExpr, but emits aggregates to a temporary location if none is available. Seems like this should be simpler (even aside from using first class aggregates). - Killed CodeGenFunction::EmitCallArg (just append the pair) - Conversion of RValues to actual call arguments is now isolated in CodeGenFunction::EmitCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55970 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.h') diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index c38171a5f5..3d14aed4bd 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -175,6 +175,12 @@ public: RValue EmitAnyExpr(const Expr *E, llvm::Value *AggLoc = 0, bool isAggLocVolatile = false); + /// EmitAnyExprToTemp - Similary to EmitAnyExpr(), however, the result + /// will always be accessible even if no aggregate location is + /// provided. + RValue EmitAnyExprToTemp(const Expr *E, llvm::Value *AggLoc = 0, + bool isAggLocVolatile = false); + /// isDummyBlock - Return true if BB is an empty basic block /// with no predecessors. static bool isDummyBlock(const llvm::BasicBlock *BB); @@ -308,14 +314,6 @@ public: // Scalar Expression Emission //===--------------------------------------------------------------------===// - /// EmitCallArg - Emit the given expression and append the result - /// onto the given Args list. - void EmitCallArg(const Expr *E, CallArgList &Args); - - /// EmitCallArg - Append the appropriate call argument for the given - /// rvalue and type onto the Args list. - void EmitCallArg(RValue RV, QualType Ty, CallArgList &Args); - /// EmitCall - Generate a call of the given function, expecting the /// given result type, and using the given argument list which /// specifies both the LLVM arguments and the types they were -- cgit v1.2.3