mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When resilience is enabled, some functions in the standard library that are marked @effects(readonly) now have indirect results. The SILCombiner pass doesn't handle @effects(readonly) with @out results correctly, so just disable the optimizations temporarily to avoid a mis-compile when resilience is enabled. The LLVM readonly attribute can never be applied to such functions, so don't set it either. Should not have an effect when resilience is disabled.