Skip to content

Commit 68564f1

Browse files
committed
[sendable-non-sendable] When tracking values flow sensitive properties, map a SILValue to the state rather than including the state in the mapping.
Otherwise, we can potentially map the same SILValue twice if its Key state is slightly different.
1 parent 7eaf573 commit 68564f1

File tree

2 files changed

+183
-101
lines changed

2 files changed

+183
-101
lines changed

include/swift/SIL/SILFunction.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,6 +1422,14 @@ class SILFunction
14221422
return getArguments().back();
14231423
}
14241424

1425+
/// Like getSelfArgument() except it returns a nullptr if we do not have a
1426+
/// selfparam.
1427+
const SILArgument *maybeGetSelfArgument() const {
1428+
if (!hasSelfParam())
1429+
return nullptr;
1430+
return getArguments().back();
1431+
}
1432+
14251433
const SILArgument *getDynamicSelfMetadata() const {
14261434
assert(hasDynamicSelfMetadata() && "This method can only be called if the "
14271435
"SILFunction has a self-metadata parameter");

0 commit comments

Comments
 (0)