Skip to content

Commit 612cd9b

Browse files
committed
[mark-uninit-fixup] Change a SILBuilder => SILBuilderWithScope.
A small part of the effort to purge SILBuilder from the code base. Without this, we will hit debug holes.
1 parent 17d65dc commit 612cd9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Mandatory/MarkUninitializedFixup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ struct MarkUninitializedFixup : SILFunctionTransform {
119119

120120
// Then create the new mark_uninitialized and force all uses of the
121121
// project_box to go through the new mark_uninitialized.
122-
SILBuilder B(std::next(PBI->getIterator()));
122+
SILBuilderWithScope B(&*std::next(PBI->getIterator()));
123123
SILValue Undef = SILUndef::get(PBI->getType(), *PBI->getFunction());
124124
auto *NewMUI =
125125
B.createMarkUninitialized(PBI->getLoc(), Undef, MUI->getKind());

0 commit comments

Comments
 (0)