Skip to content

Commit 48f63c5

Browse files
Merge pull request #62502 from nate-chandler/remove-silvalue-getownershipkind
[NFC] Removed SILValue::getOwnershipKind.
2 parents 7768b00 + fff993a commit 48f63c5

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

include/swift/SIL/SILValue.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -667,21 +667,6 @@ class SILValue {
667667
return Value->getDefiningInstruction();
668668
}
669669

670-
/// Returns the ValueOwnershipKind that describes this SILValue's ownership
671-
/// semantics if the SILValue has ownership semantics. Returns is a value
672-
/// without any Ownership Semantics.
673-
///
674-
/// An example of a SILValue without ownership semantics is a
675-
/// struct_element_addr.
676-
///
677-
/// NOTE: This is implemented in ValueOwnership.cpp not SILValue.cpp.
678-
///
679-
/// FIXME: remove this redundant API from SILValue.
680-
[[deprecated("Please use ValueBase::getOwnershipKind()")]] ValueOwnershipKind
681-
getOwnershipKind() const {
682-
return Value->getOwnershipKind();
683-
};
684-
685670
/// Verify that this SILValue and its uses respects ownership invariants.
686671
void verifyOwnership(DeadEndBlocks *DEBlocks) const;
687672

lib/SILOptimizer/Mandatory/AddressLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ static bool doesNotNeedStackAllocation(SILValue value) {
963963
// necessary to introduce new storage and move to it.
964964
if (isa<LoadBorrowInst>(defInst) ||
965965
(isa<BeginApplyInst>(defInst) &&
966-
value.getOwnershipKind() == OwnershipKind::Guaranteed))
966+
value->getOwnershipKind() == OwnershipKind::Guaranteed))
967967
return true;
968968

969969
return false;

0 commit comments

Comments
 (0)