Files
swift-mirror/test/embedded/min-pointer-value-option.swift
Erik Eckstein c02bc2d421 IRGen: add an option -min-valid-pointer-value to override the target's LeastValidPointerValue
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
2025-06-03 09:27:35 +02:00

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