Files
swift-mirror/test/embedded/throw-trap-stdlib.swift

13 lines
365 B
Swift

// RUN: %target-swift-frontend -emit-ir %s -enable-experimental-feature Embedded -throws-as-traps | %FileCheck %s
// REQUIRES: swift_in_compiler
// REQUIRES: swift_feature_Embedded
public func test() {
withUnsafeTemporaryAllocation(byteCount: MemoryLayout<Int>.size, alignment: MemoryLayout<Int>.alignment) { p in
p[0] = 42
}
}
// CHECK: swift_willThrow