You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[semantic-arc] Add a flag to SILBuilder called isParsing to allow for SILBuilder to ignore invariants while parsing.
I am going to add asserts to SILBuilder to ensure that the leaf level functions
that create qualified ownership and unqualified ownership instructions assert if
one attempts to create functions with the wrong ownership qualification.
This creates problems in the parser though since we apply the ownership
qualification heuristic to SILInstructions after we have created the instruction
via SILBuilder. I could change the ownership model evaluator to have special
methods for various instructions, but I think that would introduce more
decentralized code in the Parser which I want to avoid. Instead this commit just
introduces a small isParsing flag that is set by SILParser on its SILBuilder
that will cause these invariants to be ignored. Since the bool is used in the
actual asserts themselves they are at the call site where they have an effect,
making it very clear what is going on.
rdar://28851920
0 commit comments