Skip to content

Commit d2f251c

Browse files
committed
[NFC] OSSACanonicalizeOwned: Shadow member.
Add a local variable that shadows the `defUseWorklist` instance member, enabling further constraints (e.g. `const`ness) to eventually be imposed.
1 parent aed2174 commit d2f251c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/SILOptimizer/Utils/CanonicalizeOSSALifetime.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,9 @@ void CanonicalizeOSSALifetime::rewriteCopies(
11491149
SmallVectorImpl<DestroyValueInst *> const &newDestroys) {
11501150
assert(getCurrentDef()->getOwnershipKind() == OwnershipKind::Owned);
11511151

1152+
// Shadow defUseWorklist in order to constrain its uses.
1153+
auto &defUseWorklist = this->defUseWorklist;
1154+
11521155
InstructionSetVector instsToDelete(getCurrentDef()->getFunction());
11531156

11541157
// Visit each operand in the def-use chain.

0 commit comments

Comments
 (0)