mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The LeastValidPointerValue is hard-coded in the runtime. Therefore this option is only available in embedded swift - which doesn't have a runtime. rdar://151755654
22 lines
546 B
Swift
22 lines
546 B
Swift
|
|
// RUN: %target-swift-emit-ir %s -module-name main -parse-as-library -enable-experimental-feature Embedded -O -min-valid-pointer-value=0x200 | %FileCheck %s
|
|
|
|
// REQUIRES: OS=macosx || OS=linux-gnu
|
|
// REQUIRES: swift_feature_Embedded
|
|
|
|
public func testit(_ s: S?) -> Bool {
|
|
return s != nil
|
|
}
|
|
|
|
class C {}
|
|
|
|
public struct S {
|
|
var a = InlineArray<57, UInt8>(repeating: 0)
|
|
var b = C()
|
|
var c = InlineArray<49, UInt8>(repeating: 0)
|
|
}
|
|
|
|
// CHECK-LABEL: define {{.*}} @"$e4main1SVSgWOg"(ptr %0)
|
|
// CHECK: icmp {{.*}}, 511
|
|
// CHECK-LABEL: }
|