clang 20.0.0git
|
Represents a version mapping that maps from a version of one target to a version of a related target. More...
#include "clang/Basic/DarwinSDKInfo.h"
Public Member Functions | |
RelatedTargetVersionMapping (VersionTuple MinimumKeyVersion, VersionTuple MaximumKeyVersion, VersionTuple MinimumValue, VersionTuple MaximumValue, llvm::DenseMap< VersionTuple, VersionTuple > Mapping) | |
const VersionTuple & | getMinimumValue () const |
Returns the value with the lowest version in the mapping. | |
std::optional< VersionTuple > | map (const VersionTuple &Key, const VersionTuple &MinimumValue, std::optional< VersionTuple > MaximumValue) const |
Returns the mapped key, or the appropriate Minimum / MaximumValue if they key is outside of the mapping bounds. | |
std::optional< VersionTuple > | mapIntroducedAvailabilityVersion (const VersionTuple &Key) const |
Remap the 'introduced' availability version. | |
std::optional< VersionTuple > | mapDeprecatedObsoletedAvailabilityVersion (const VersionTuple &Key) const |
Remap the 'deprecated' and 'obsoleted' availability version. | |
Static Public Member Functions | |
static std::optional< RelatedTargetVersionMapping > | parseJSON (const llvm::json::Object &Obj, VersionTuple MaximumDeploymentTarget) |
Represents a version mapping that maps from a version of one target to a version of a related target.
e.g. "macOS_iOSMac":{"10.15":"13.1"} is an example of a macOS -> Mac Catalyst version map.
Definition at line 86 of file DarwinSDKInfo.h.
|
inline |
Definition at line 88 of file DarwinSDKInfo.h.
|
inline |
Returns the value with the lowest version in the mapping.
Definition at line 99 of file DarwinSDKInfo.h.
std::optional< VersionTuple > DarwinSDKInfo::RelatedTargetVersionMapping::map | ( | const VersionTuple & | Key, |
const VersionTuple & | MinimumValue, | ||
std::optional< VersionTuple > | MaximumValue | ||
) | const |
Returns the mapped key, or the appropriate Minimum / MaximumValue if they key is outside of the mapping bounds.
If they key isn't mapped, but within the minimum and maximum bounds, std::nullopt is returned.
Definition at line 18 of file DarwinSDKInfo.cpp.
References map().
Referenced by map(), mapDeprecatedObsoletedAvailabilityVersion(), and mapIntroducedAvailabilityVersion().
|
inline |
Remap the 'deprecated' and 'obsoleted' availability version.
If None is returned for 'obsoleted', the 'unavailable' availability should be used instead. If None is returned for 'deprecated', the 'deprecated' version should be dropped.
Definition at line 125 of file DarwinSDKInfo.h.
References map().
|
inline |
Remap the 'introduced' availability version.
If None is returned, the 'unavailable' availability should be used instead.
Definition at line 112 of file DarwinSDKInfo.h.
References map().
|
static |
Definition at line 38 of file DarwinSDKInfo.cpp.
References clang::Max, and clang::Min.
Referenced by clang::DarwinSDKInfo::parseDarwinSDKSettingsJSON().