Files
swift-mirror/test/embedded/min-pointer-value-default-darwin.swift
Doug Gregor 923689c2b4 [Embedded] Only reserve 4KB in embedded Darwin targets
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.
2025-08-25 23:21:34 -07:00

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: }