mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILGen: Emit an addressable representation for immutable bindings on demand.
To ensure that dependent values have a persistent-enough memory representation to point into, when an immutable binding is referenced as an addressable argument to a call, have SILGen retroactively emit a stack allocation and materialization that covers the binding's scope.
This commit is contained in:
@@ -740,7 +740,7 @@ void SILGenFunction::emitCaptures(SILLocation loc,
|
||||
}
|
||||
};
|
||||
|
||||
auto Entry = found->second;
|
||||
auto &Entry = found->second;
|
||||
auto val = Entry.value;
|
||||
|
||||
switch (SGM.Types.getDeclCaptureKind(capture, expansion)) {
|
||||
|
||||
Reference in New Issue
Block a user