diff options
author | Chris Lattner <sabre@nondot.org> | 2007-06-15 21:34:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-06-15 21:34:29 +0000 |
commit | 2b228c95aa9bf69f27af12294149f57459ef41b1 (patch) | |
tree | 7fe530597b70eac5ebebd1941e080d4ccc77efcc /clang/CodeGen/CodeGenFunction.h | |
parent | 52d85bdd2b63825075c50a1fdb2f917bb5252ac5 (diff) | |
download | bcm5719-llvm-2b228c95aa9bf69f27af12294149f57459ef41b1.tar.gz bcm5719-llvm-2b228c95aa9bf69f27af12294149f57459ef41b1.zip |
implement codegen of calls. We can now compile:
double foo( int (*FP)(int, int, int)) {
return FP(1, 2, 3);
}
to:
define double @foo(i32 (i32, i32, i32)* %FP) {
entry:
%call = tail call i32 %FP( i32 1, i32 2, i32 3 )
%conv = sitofp i32 %call to double
ret double %conv
}
llvm-svn: 39658
Diffstat (limited to 'clang/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/CodeGen/CodeGenFunction.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/CodeGen/CodeGenFunction.h b/clang/CodeGen/CodeGenFunction.h index ad80b382e27..1b078879dff 100644 --- a/clang/CodeGen/CodeGenFunction.h +++ b/clang/CodeGen/CodeGenFunction.h @@ -45,6 +45,7 @@ namespace clang { class StringLiteral; class IntegerLiteral; class CastExpr; + class CallExpr; class UnaryOperator; class BinaryOperator; class ArraySubscriptExpr; @@ -251,6 +252,7 @@ public: RValue EmitIntegerLiteral(const IntegerLiteral *E); RValue EmitCastExpr(const CastExpr *E); + RValue EmitCallExpr(const CallExpr *E); // Unary Operators. RValue EmitUnaryOperator(const UnaryOperator *E); |