Skip to content

Commit bfff482

Browse files
committed
SILCombine: directly get the SILBuilderContext from SILBuilder for tryOptimizeApplyOfPartialApply
It's a NFC
1 parent d4837c4 commit bfff482

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,8 @@ SILInstruction *SILCombiner::visitPartialApplyInst(PartialApplyInst *PAI) {
104104
if (foldInverseReabstractionThunks(PAI, this))
105105
return nullptr;
106106

107-
SILBuilderContext BuilderCtxt(Builder.getModule(), Builder.getTrackingList());
108-
BuilderCtxt.setOpenedArchetypesTracker(Builder.getOpenedArchetypesTracker());
109-
bool argsAreKeptAlive =
110-
tryOptimizeApplyOfPartialApply(PAI, BuilderCtxt, getInstModCallbacks());
107+
bool argsAreKeptAlive = tryOptimizeApplyOfPartialApply(
108+
PAI, Builder.getBuilderContext(), getInstModCallbacks());
111109
if (argsAreKeptAlive)
112110
needUpdateStackNesting = true;
113111

0 commit comments

Comments
 (0)