[llvm][TextAPI] Handle implicitly upgraded deployment versions
authorCyndy Ishida <cyndy_ishida@apple.com>
Thu, 23 Mar 2023 21:51:37 +0000 (14:51 -0700)
committerCyndy Ishida <cyndy_ishida@apple.com>
Thu, 23 Mar 2023 21:58:41 +0000 (14:58 -0700)
commit397486566e995a019c249784b1d07c53b6ac670d
tree52ee97018e3336daf8299db2c778dc2551090d05
parentec2333d88538c1675227a555140a13bc27aafb69
[llvm][TextAPI] Handle implicitly upgraded deployment versions

Sometimes the clang driver will receive a target triple where the
deployment version is too low to support the platform + arch. In those
cases, the compiler upgrades the final minOS which is what gets recorded
ultimately by the linker in LC_BUILD_VERSION. TextAPI should also reuse
this logic for capturing minOS in recorded TBDv5 files.

Reviewed By: ributzka

Differential Revision: https://reviews.llvm.org/D145690
llvm/include/llvm/TextAPI/Platform.h
llvm/include/llvm/TextAPI/Target.h
llvm/lib/TextAPI/Platform.cpp
llvm/lib/TextAPI/TextStubV5.cpp
llvm/unittests/TextAPI/TextStubV5Tests.cpp