Skip to content

Commit f1139e4

Browse files
committed
[PrunedLiveness] Allow inhabited discovered blocks
The vector is just used for collecting blocks that have been discovered, so it's fine to append such blocks to a list that's already not empty.
1 parent 7d8198e commit f1139e4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

include/swift/SIL/PrunedLiveness.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,7 @@ class PrunedLiveBlocks {
196196
public:
197197
PrunedLiveBlocks(SILFunction *function,
198198
SmallVectorImpl<SILBasicBlock *> *discoveredBlocks = nullptr)
199-
: liveBlocks(function, 2), discoveredBlocks(discoveredBlocks) {
200-
assert(!discoveredBlocks || discoveredBlocks->empty());
201-
}
199+
: liveBlocks(function, 2), discoveredBlocks(discoveredBlocks) {}
202200

203201
bool isInitialized() const { return initializedFlag; }
204202

0 commit comments

Comments
 (0)