Skip to content

Commit eb69897

Browse files
committed
[MoveOnlyAddressChecker] NFC: Used helper.
Used the TypeTreeLeafTypeRange::setBits helper rather than looping over the range and setting the bits in place.
1 parent bd8e6bc commit eb69897

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerUtils.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,9 +668,7 @@ struct UseState {
668668

669669
void recordLivenessUse(SILInstruction *inst, TypeTreeLeafTypeRange range) {
670670
auto &bits = getOrCreateLivenessUse(inst);
671-
for (auto element : range.getRange()) {
672-
bits.set(element);
673-
}
671+
range.setBits(bits);
674672
}
675673

676674
/// Returns true if this is a terminator instruction that although it doesn't

0 commit comments

Comments
 (0)