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
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 5d34f65..fe28b3a 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -125,7 +125,7 @@
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 @@
}
}
- 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.