diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-02 22:03:45 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-02 22:03:45 +0000 |
commit | d931a87f902a045aa82797228ad5a0963da2c6f4 (patch) | |
tree | 90eb283b160ccffb28d41359bc092ea193aa53e1 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | e83866065b206f90aae6a25724dd3c1274720269 (diff) | |
download | bcm5719-llvm-d931a87f902a045aa82797228ad5a0963da2c6f4.tar.gz bcm5719-llvm-d931a87f902a045aa82797228ad5a0963da2c6f4.zip |
More ABI API cleanup.
- Lift CGFunctionInfo creation above ReturnTypeUsesSret and
EmitFunction{Epi,Pro}log.
llvm-svn: 63553
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 5d34f65fc14..fe28b3aeccd 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -125,7 +125,7 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { DI->EmitRegionEnd(CurFn, Builder); } - EmitFunctionEpilog(FnRetTy, ReturnValue); + EmitFunctionEpilog(*CurFnInfo, ReturnValue); // Remove the AllocaInsertPt instruction, which is just a convenience for us. AllocaInsertPt->eraseFromParent(); @@ -171,7 +171,9 @@ void CodeGenFunction::StartFunction(const Decl *D, QualType RetTy, } } - EmitFunctionProlog(CurFn, FnRetTy, Args); + // FIXME: Leaked. + CurFnInfo = new CGFunctionInfo(FnRetTy, Args); + EmitFunctionProlog(*CurFnInfo, CurFn, Args); // If any of the arguments have a variably modified type, make sure to // emit the type size. |