clang 18.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::DarwinSDKInfo::RelatedTargetVersionMapping Class Reference

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< RelatedTargetVersionMappingparseJSON (const llvm::json::Object &Obj, VersionTuple MaximumDeploymentTarget)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RelatedTargetVersionMapping()

clang::DarwinSDKInfo::RelatedTargetVersionMapping::RelatedTargetVersionMapping ( VersionTuple  MinimumKeyVersion,
VersionTuple  MaximumKeyVersion,
VersionTuple  MinimumValue,
VersionTuple  MaximumValue,
llvm::DenseMap< VersionTuple, VersionTuple >  Mapping 
)
inline

Definition at line 88 of file DarwinSDKInfo.h.

Member Function Documentation

◆ getMinimumValue()

const VersionTuple & clang::DarwinSDKInfo::RelatedTargetVersionMapping::getMinimumValue ( ) const
inline

Returns the value with the lowest version in the mapping.

Definition at line 99 of file DarwinSDKInfo.h.

◆ map()

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().

◆ parseJSON()

std::optional< DarwinSDKInfo::RelatedTargetVersionMapping > DarwinSDKInfo::RelatedTargetVersionMapping::parseJSON ( const llvm::json::Object &  Obj,
VersionTuple  MaximumDeploymentTarget 
)
static

Definition at line 38 of file DarwinSDKInfo.cpp.

Referenced by clang::DarwinSDKInfo::parseDarwinSDKSettingsJSON().


The documentation for this class was generated from the following files: