mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The `store_borrow` instruction has a result and that must be set. Fixes a false error of the OSLogOptimization. rdar://144896232
15 lines
382 B
Swift
15 lines
382 B
Swift
// RUN: %target-swift-frontend -swift-version 6 -verify %s -emit-sil -o /dev/null
|
|
|
|
// REQUIRES: OS=macosx
|
|
// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib
|
|
|
|
import os.log
|
|
|
|
let logger = Logger(subsystem: "x.y.z", category: "c")
|
|
|
|
// Check that this compiles without errors
|
|
|
|
func testit(buffer: UnsafeRawBufferPointer) {
|
|
logger.fault("buffer \(buffer, privacy: .sensitive)")
|
|
}
|