swift
swift copied to clipboard
🍒[cxx-interop] Make a test work properly with optimizations
Explanation: This fixes one of the tests which wasn't fully correct: the compiler might optimize away one of the copies, which would make the test fail. Scope: This is a test-only change. Risk: Low, this doesn't change any production logic.
rdar://110422053 (cherry picked from commit df29fc33a89c6531a6644cf14002a39e642420e6)
@swift-ci please test
@swift-ci please test Windows
This is a follow up change to test after https://github.com/apple/swift/pull/66271 consistently optimizes away copies in debug as well as -O modes.