swift
eff9bacb - Treat swift_willThrow(Typed) as not locking or performing allocation

Commit
1 year ago
Treat swift_willThrow(Typed) as not locking or performing allocation Prior to throwing, Swift emits a call to `swift_willThrow(Typed)`, which allows various diagnostic tools (such as debuggers and testing libraries) to intercept errors at the point where they are initially thrown. Since `swift_willThrow(Typed)` can be hooked by arbitrary code at runtime, there is no way for it to meet performance constraints like @_noLocks or @_noAllocation. Therefore, in a function that has those performance constraints specified, disable emission of the call to `swift_willThrow(Typed)`. Fixes rdar://140230684.
Author
Committer
Parents
Loading