Files
swift-mirror/validation-test/SILOptimizer/oslog.swift
Erik Eckstein 328e6aad07 ConstExpr: fix handling of store_borrow
The `store_borrow` instruction has a result and that must be set.
Fixes a false error of the OSLogOptimization.
rdar://144896232
2025-02-19 13:30:07 +01:00

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)")
}