diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-09-09 01:06:48 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-09-09 01:06:48 +0000 |
commit | 46f45b9bec4a265ad8400a538e5ec3a5683617f1 (patch) | |
tree | 6a9ca0751b54becfb033fb33a1bc954079ad34d1 /lib/CodeGen/CodeGenFunction.h | |
parent | f47be933bef073708c2536fa69ef946e7fe08134 (diff) |
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
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 14 |
1 files changed, 6 insertions, 8 deletions
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 |