swift
5e36a2a6 - Fix an AccessedStorage assert for SIL global variables.

Commit
3 years ago
Fix an AccessedStorage assert for SIL global variables. Allow round-tripping access to global variables. Previously, AccessedStorage asserted that global variables were always associated with a VarDecl. This was to ensure that AccessEnforcmentWMO always recognized the global. Failing to recognize access to a global will cause a miscompile. SILGlobalVariable now has all the information needed by SIL. Particularly, the 'isLet' flag. Simply replace VarDecl with SILGlobalVariable in AccessEnforcmentWMO to eliminate the need for the assert.
Author
Committer
Parents
Loading