mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Added new files, MemAccessUtils.h and MemAccessUtils.cpp to house the new utility. Three functions previously in InstructionUtils.h move here: - findAccessedAddressBase - isPossibleFormalAccessBase - visitAccessedAddress Rather than working with SILValues, these routines now work with the AccessedStorage abstraction. This allows enforcement logic and SIL pattern recognition to be shared across diagnostics and optimization. (It's very important for this to be consistent). The new AccessedStorage utility is a superset of the class that was local to DiagnoseStaticExclusivity. It exposes the full set of all recognized kinds of storage. It also represents function arguments as an index rather that a SILValue. This allows an analysis pass to compare/merge AccessedStorage results from multiple callee functions, or more naturally propagate from callee to caller context.
6.8 KiB
6.8 KiB