clang 18.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. | |
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().
|
static |
Definition at line 38 of file DarwinSDKInfo.cpp.
Referenced by clang::DarwinSDKInfo::parseDarwinSDKSettingsJSON().