[compiler-rt] [compiler-rt][builtins] Upstream __isPlatformOrVariantPlatformVersionAtLeast() (PR #100605)
Louis Dionne via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 13:12:33 PDT 2024
================
@@ -7,11 +7,22 @@ typedef unsigned int uint32_t;
int32_t __isPlatformVersionAtLeast(uint32_t Platform, uint32_t Major,
uint32_t Minor, uint32_t Subminor);
+int32_t __isPlatformOrVariantPlatformVersionAtLeast(
+ uint32_t Platform, uint32_t Major, uint32_t Minor, uint32_t Subminor,
+ uint32_t Platform2, uint32_t Major2, uint32_t Minor2, uint32_t Subminor2);
+
+void exit(int status);
+
#define PLATFORM_MACOS 1
+#define PLATFORM_IOS 2
int32_t check(uint32_t Major, uint32_t Minor, uint32_t Subminor) {
int32_t Result =
__isPlatformVersionAtLeast(PLATFORM_MACOS, Major, Minor, Subminor);
+ int32_t ResultVariant = __isPlatformOrVariantPlatformVersionAtLeast(
+ PLATFORM_MACOS, Major, Minor, Subminor, PLATFORM_IOS, 13, 0, 0);
----------------
ldionne wrote:
Is there a reason for hardcoding the iOS version here?
https://github.com/llvm/llvm-project/pull/100605
More information about the llvm-commits
mailing list