From 88b5396b0897f28d22ae3debf4a0d97b33b6c362 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 2 Feb 2009 22:03:45 +0000 Subject: More ABI API cleanup. - Lift CGFunctionInfo creation above ReturnTypeUsesSret and EmitFunction{Epi,Pro}log. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63553 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 5d34f65fc1..fe28b3aecc 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/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. -- cgit v1.2.3-18-g5258