Skip to content

Commit 07dbf4e

Browse files
authored
Merge pull request swiftlang#35157 from atrick/remove-deadblocks
2 parents 82aef54 + fe6e879 commit 07dbf4e

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

include/swift/SIL/SILFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ class SILFunction
11061106
/// NOTE: The ownership verifier is always run when performing normal IR
11071107
/// verification, so this verification can be viewed as a subset of
11081108
/// SILFunction::verify.
1109-
void verifyOwnership(DeadEndBlocks *deadEndBlocks = nullptr) const;
1109+
void verifyOwnership(DeadEndBlocks *deadEndBlocks) const;
11101110

11111111
/// Verify that all non-cond-br critical edges have been split.
11121112
///

include/swift/SIL/SILValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ class SILValue {
571571
ValueOwnershipKind getOwnershipKind() const;
572572

573573
/// Verify that this SILValue and its uses respects ownership invariants.
574-
void verifyOwnership(DeadEndBlocks *DEBlocks = nullptr) const;
574+
void verifyOwnership(DeadEndBlocks *DEBlocks) const;
575575
};
576576

577577
inline bool ValueOwnershipKind::isCompatibleWith(SILValue other) const {

lib/SIL/Verifier/SILOwnershipVerifier.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -772,16 +772,9 @@ verifySILValueHelper(const SILFunction *f, SILValue value,
772772
return;
773773

774774
SmallPtrSet<SILBasicBlock *, 32> liveBlocks;
775-
if (deadEndBlocks) {
776-
SILValueOwnershipChecker(*deadEndBlocks, value, errorBuilder, liveBlocks,
777-
reborrowVerifier)
778-
.check();
779-
} else {
780-
DeadEndBlocks deadEndBlocks(f);
781-
SILValueOwnershipChecker(deadEndBlocks, value, errorBuilder, liveBlocks,
782-
reborrowVerifier)
783-
.check();
784-
}
775+
SILValueOwnershipChecker(*deadEndBlocks, value, errorBuilder, liveBlocks,
776+
reborrowVerifier)
777+
.check();
785778
}
786779

787780
void SILValue::verifyOwnership(DeadEndBlocks *deadEndBlocks) const {

0 commit comments

Comments
 (0)