SwiftCompilerSources: Add enum BeginAccess.AccessKind

So we can switch over it.
This commit is contained in:
Andrew Trick
2024-02-20 00:34:56 -08:00
parent 9515ab9ed8
commit a3cbc28078
6 changed files with 15 additions and 21 deletions

View File

@@ -355,7 +355,7 @@ private struct StackProtectionOptimization {
/// Moves the value of a `beginAccess` to a temporary stack location, if possible.
private func moveToTemporary(scope beginAccess: BeginAccessInst, mustFixStackNesting: inout Bool,
_ context: FunctionPassContext) {
if beginAccess.accessKind != .Modify {
if beginAccess.accessKind != .modify {
// We can only move from a `modify` access.
// Also, read-only accesses shouldn't be subject to buffer overflows (because
// no one should ever write to such a storage).