More ABI API cleanup.
- Lift CGFunctionInfo creation above ReturnTypeUsesSret and
EmitFunction{Epi,Pro}log.
llvm-svn: 63553
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 5d34f65..fe28b3a 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/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.