Skip to content

Commit a42511e

Browse files
committed
[NFC] Replace ApplyInst::getSubstCalleeConv()::hasGuaranteedAddressResult() with ApplyInst::hasGuaranteedAddressResult()
1 parent 995d6a7 commit a42511e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

include/swift/SIL/MemAccessUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ inline bool isGuaranteedAddressReturn(SILValue value) {
169169
if (!defInst) {
170170
return false;
171171
}
172-
return defInst->getSubstCalleeConv().hasGuaranteedAddressResult();
172+
return defInst->hasGuaranteedAddressResult();
173173
}
174174

175175
/// Return the source address after stripping as many access projections as

include/swift/SIL/SILInstruction.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3150,7 +3150,10 @@ class ApplyInst final
31503150

31513151
public:
31523152
bool hasGuaranteedResult() const {
3153-
return getSubstCalleeConv().hasGuaranteedResult();
3153+
return getSubstCalleeConv().hasGuaranteedResult();
3154+
}
3155+
bool hasGuaranteedAddressResult() const {
3156+
return getSubstCalleeConv().hasGuaranteedAddressResult();
31543157
}
31553158
};
31563159

lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ addressBeginsInitialized(MarkUnresolvedNonCopyableValueInst *address) {
11151115

11161116
if (auto *applyInst = dyn_cast_or_null<ApplyInst>(
11171117
stripAccessMarkers(operand)->getDefiningInstruction())) {
1118-
if (applyInst->getSubstCalleeConv().hasGuaranteedAddressResult()) {
1118+
if (applyInst->hasGuaranteedAddressResult()) {
11191119
LLVM_DEBUG(llvm::dbgs() << "Adding apply as init!\n");
11201120
return true;
11211121
}

0 commit comments

Comments
 (0)