mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #80038 from jckarter/addressable-for-deps-lowering
SIL: Lower fields that are conditionally addressable because of a dependency.
This commit is contained in:
@@ -2524,7 +2524,7 @@ parseLifetimeDescriptor(Parser &P,
|
||||
// In SIL, lifetimes explicitly state whether they are dependent on a
|
||||
// memory location in addition to the value stored at that location.
|
||||
if (P.isInSILMode()
|
||||
&& name.str() == "address"
|
||||
&& (name.str() == "address" || name.str() == "address_for_deps")
|
||||
&& P.Tok.is(tok::integer_literal)) {
|
||||
SourceLoc orderedLoc;
|
||||
unsigned index;
|
||||
@@ -2534,7 +2534,9 @@ parseLifetimeDescriptor(Parser &P,
|
||||
return std::nullopt;
|
||||
}
|
||||
return LifetimeDescriptor::forOrdered(index, lifetimeDependenceKind, loc,
|
||||
/*addressable*/ true);
|
||||
name.str() == "address_for_deps"
|
||||
? LifetimeDescriptor::IsConditionallyAddressable
|
||||
: LifetimeDescriptor::IsAddressable);
|
||||
}
|
||||
|
||||
return LifetimeDescriptor::forNamed(name, lifetimeDependenceKind, loc);
|
||||
|
||||
Reference in New Issue
Block a user