-// RUN: %target-typecheck-verify-swift
+// RUN: %target-typecheck-verify-swift -target x86_64-apple-macosx10.52
 
-// RUN: %target-swift-emit-silgen -emit-sorted-sil -o %t.fragile.sil %s
+// RUN: %target-swift-emit-silgen -target x86_64-apple-macosx10.52 -emit-sorted-sil -o %t.fragile.sil %s
 // RUN: %FileCheck %s < %t.fragile.sil
 // RUN: %FileCheck -check-prefix NEGATIVE %s < %t.fragile.sil
 
-// RUN: %target-swift-emit-silgen -emit-sorted-sil -enable-resilience -o %t.resilient.sil %s
+// RUN: %target-swift-emit-silgen -target x86_64-apple-macosx10.52 -emit-sorted-sil -enable-resilience -o %t.resilient.sil %s
 // RUN: %FileCheck %s < %t.resilient.sil
 // RUN: %FileCheck -check-prefix NEGATIVE %s < %t.resilient.sil
 

// CHECK: integer_literal $Builtin.IntLiteral, -3000
// CHECK: cond_br {{[^,]+}}, [[potentiallyUnavailable:bb[0-9]+]]

// CHECK: [[potentiallyUnavailable]]:
// CHECK-NEXT: integer_literal $Builtin.Word, 500
// CHECK-NEXT: integer_literal $Builtin.Word, 600
// CHECK-NEXT: integer_literal $Builtin.Word, 700
// CHECK: function_ref @$ss26_stdlib_isOSVersionAtLeastyBi1_Bw_BwBwtF
// CHECK: cond_br {{[^,]+}}, [[potentiallyUnavailable_newEnough:bb[0-9]+]],


// CHECK: end sil function '$s4main1EO8rawValueSivg'

// NEGATIVE-LABEL: sil {{(\[serialized\] )?}}[ossa] @$s4main1EO8rawValueACSgSi_tcfC

// Should not try to match neverAvailable's raw value
// NEGATIVE-NOT: integer_literal $Builtin.IntLiteral, -4000

// Should not try to match nowObsolete's raw value
// NEGATIVE-NOT: integer_literal $Builtin.IntLiteral, -6000

// Should not have a version check for notObsoleteYet
// NEGATIVE-NOT: integer_literal $Builtin.Word, 99

// NEGATIVE: end sil function '$s4main1EO8rawValueACSgSi_tcfC'
