diff options
author | Alex Lorenz <arphaman@gmail.com> | 2020-10-28 22:48:59 -0700 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2020-11-02 16:28:09 -0800 |
commit | 701456b52355c25089e1b536805164570f5def6f (patch) | |
tree | b4208d28b271668161f8268624b3cbfc5ef7f8de /clang/lib/CodeGen/CodeGenModule.h | |
parent | 5a829ef6adeb560d297ce596becb79527d88bbf7 (diff) | |
download | llvm-701456b52355c25089e1b536805164570f5def6f.zip llvm-701456b52355c25089e1b536805164570f5def6f.tar.gz llvm-701456b52355c25089e1b536805164570f5def6f.tar.bz2 |
[darwin] add support for __isPlatformVersionAtLeast check for if (@available)
The __isPlatformVersionAtLeast routine is an implementation of `if (@available)` check
that uses the _availability_version_check API on Darwin that's supported on
macOS 10.15, iOS 13, tvOS 13 and watchOS 6.
Differential Revision: https://reviews.llvm.org/D90367
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index cb5b9bd..8996805 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -606,9 +606,11 @@ public: return *ObjCData; } - // Version checking function, used to implement ObjC's @available: + // Version checking functions, used to implement ObjC's @available: // i32 @__isOSVersionAtLeast(i32, i32, i32) llvm::FunctionCallee IsOSVersionAtLeastFn = nullptr; + // i32 @__isPlatformVersionAtLeast(i32, i32, i32, i32) + llvm::FunctionCallee IsPlatformVersionAtLeastFn = nullptr; InstrProfStats &getPGOStats() { return PGOStats; } llvm::IndexedInstrProfReader *getPGOReader() const { return PGOReader.get(); } |