mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The reason why I am doing this is that we are going to be enabling lexical lifetimes early in the pipeline so that I can use it for the move operator's diagnostics. To make it easy for passes to know whether or not they should support lexical lifetimes, I included a query on SILOptions called supportsLexicalLifetimes. This will return true if the pass (given the passed in option) should insert the lexical lifetime flag. This ensures that passes that run in both pipelines (e.x.: AllocBoxToStack) know whether or not to set the lexical lifetime flag without having to locally reason about it. This is just chopping off layers of a larger patch I am upstreaming. NOTE: This is technically NFC since it leaves the default alone of not inserting lexical lifetimes at all.
89 KiB
89 KiB