[compiler-rt] Fix __isOSVersionAtLeast for Android (PR #80496)

Jooyung Han via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 14:36:41 PST 2024


jooyunghan wrote:

> Right now you use`__builtin_available(android 10000)`. That will never cause an unavailable function to be called.

`__builtin_available(android 10000)` will be eval to `true` in preview build and `false` in release build.

> After this patch, you would be able to write `__builtin_available(android N+2)`, and that would cause unavailable functions in some configurations, which would crash.

`__builtin_available(android N+2)` would be eval to `true` in preview build and `false` in release build (until N+2 is finalize).



https://github.com/llvm/llvm-project/pull/80496


More information about the llvm-commits mailing list