mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Non-embedded Darwin targets reserve the first 4GB of address space. All other targets reserve 4KB of address space. Make Embedded Darwin targets only reserve the first 4KB (as with other targets), since they aren't in userspace. Fixes rdar://158981013.
23 lines
658 B
Swift
23 lines
658 B
Swift
|
|
// RUN: %target-swift-emit-ir %s -module-name main -parse-as-library -enable-experimental-feature Embedded -O -min-valid-pointer-value=0x1000 | %FileCheck %s
|
|
// RUN: %target-swift-emit-ir %s -module-name main -parse-as-library -enable-experimental-feature Embedded -O | %FileCheck %s
|
|
|
|
// REQUIRES: OS=macosx
|
|
// 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 {{.*}}, 4095
|
|
// CHECK-LABEL: }
|