aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-02 22:03:45 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-02 22:03:45 +0000
commit88b5396b0897f28d22ae3debf4a0d97b33b6c362 (patch)
tree7838b5a53781e11e09273dad5fdd044b44174b9d /lib/CodeGen/CodeGenFunction.cpp
parentd671c5a61605ab864768cbbb4feb9cd652609083 (diff)
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
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp6
1 files changed, 4 insertions, 2 deletions
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.