clang  14.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. More...
 
Optional< VersionTuple > map (const VersionTuple &Key, const VersionTuple &MinimumValue, Optional< VersionTuple > MaximumValue) const
 Returns the mapped key, or the appropriate Minimum / MaximumValue if they key is outside of the mapping bounds. More...
 

Static Public Member Functions

static 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 71 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 73 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 84 of file DarwinSDKInfo.h.

◆ map()

Optional< VersionTuple > DarwinSDKInfo::RelatedTargetVersionMapping::map ( const VersionTuple &  Key,
const VersionTuple &  MinimumValue,
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, None is returned.

Definition at line 17 of file DarwinSDKInfo.cpp.

◆ parseJSON()

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

Definition at line 37 of file DarwinSDKInfo.cpp.

References max().

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


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