clang 23.0.0git
clang::DarwinSDKInfo Class Reference

The information about the darwin SDK that was used during this compilation. More...

#include "clang/Basic/DarwinSDKInfo.h"

Classes

struct  OSEnvPair
 A value that describes two os-environment pairs that can be used as a key to the version map in the SDK. More...
class  RelatedTargetVersionMapping
 Represents a version mapping that maps from a version of one target to a version of a related target. More...
struct  SDKPlatformInfo
 Information about the supported platforms, derived from the target triple definitions, in the SDK. More...

Public Types

using PlatformInfoStorageType = SmallVector<SDKPlatformInfo, 2>

Public Member Functions

 DarwinSDKInfo (std::string FilePath, llvm::Triple::OSType OS, llvm::Triple::EnvironmentType Environment, VersionTuple Version, StringRef DisplayName, VersionTuple MaximumDeploymentTarget, PlatformInfoStorageType PlatformInfos, llvm::DenseMap< OSEnvPair::StorageType, std::optional< RelatedTargetVersionMapping > > VersionMappings=llvm::DenseMap< OSEnvPair::StorageType, std::optional< RelatedTargetVersionMapping > >())
 DarwinSDKInfo (llvm::Triple::OSType OS, llvm::Triple::EnvironmentType Environment, VersionTuple Version, StringRef DisplayName, VersionTuple MaximumDeploymentTarget)
 Construct SDK Info inferred from the parameters rather than read from SDKSettings.json.
StringRef getFilePath () const
llvm::Triple::OSType getOS () const
llvm::Triple::EnvironmentType getEnvironment () const
const llvm::VersionTuple & getVersion () const
const StringRef getDisplayName () const
const llvm::Triple & getCanonicalPlatformTriple () const
bool supportsTriple (const llvm::Triple &Triple) const
StringRef getPlatformPrefix (const llvm::Triple &Triple) const
const RelatedTargetVersionMappinggetVersionMapping (OSEnvPair Kind) const

Static Public Member Functions

static std::optional< DarwinSDKInfoparseDarwinSDKSettingsJSON (std::string FilePath, const llvm::json::Object *Obj)

Detailed Description

The information about the darwin SDK that was used during this compilation.

Definition at line 33 of file DarwinSDKInfo.h.

Member Typedef Documentation

◆ PlatformInfoStorageType

Constructor & Destructor Documentation

◆ DarwinSDKInfo() [1/2]

clang::DarwinSDKInfo::DarwinSDKInfo ( std::string FilePath,
llvm::Triple::OSType OS,
llvm::Triple::EnvironmentType Environment,
VersionTuple Version,
StringRef DisplayName,
VersionTuple MaximumDeploymentTarget,
PlatformInfoStorageType PlatformInfos,
llvm::DenseMap< OSEnvPair::StorageType, std::optional< RelatedTargetVersionMapping > > VersionMappings = llvm::DenseMap<OSEnvPair::StorageType, std::optional<RelatedTargetVersionMapping>>() )
inline

Definition at line 167 of file DarwinSDKInfo.h.

Referenced by DarwinSDKInfo(), and parseDarwinSDKSettingsJSON().

◆ DarwinSDKInfo() [2/2]

DarwinSDKInfo::DarwinSDKInfo ( llvm::Triple::OSType OS,
llvm::Triple::EnvironmentType Environment,
VersionTuple Version,
StringRef DisplayName,
VersionTuple MaximumDeploymentTarget )

Construct SDK Info inferred from the parameters rather than read from SDKSettings.json.

This will infer PlatformInfos from an SDK for the OS/Environment that predates the introduction of SDKSettings.json, and will not infer version mappings.

Definition at line 345 of file DarwinSDKInfo.cpp.

References DarwinSDKInfo(), and legacyPlatformInfos().

Member Function Documentation

◆ getCanonicalPlatformTriple()

const llvm::Triple & clang::DarwinSDKInfo::getCanonicalPlatformTriple ( ) const
inline

Definition at line 203 of file DarwinSDKInfo.h.

◆ getDisplayName()

const StringRef clang::DarwinSDKInfo::getDisplayName ( ) const
inline

Definition at line 201 of file DarwinSDKInfo.h.

◆ getEnvironment()

llvm::Triple::EnvironmentType clang::DarwinSDKInfo::getEnvironment ( ) const
inline

Definition at line 197 of file DarwinSDKInfo.h.

◆ getFilePath()

StringRef clang::DarwinSDKInfo::getFilePath ( ) const
inline

Definition at line 193 of file DarwinSDKInfo.h.

◆ getOS()

llvm::Triple::OSType clang::DarwinSDKInfo::getOS ( ) const
inline

Definition at line 195 of file DarwinSDKInfo.h.

Referenced by parsePlatformInfos().

◆ getPlatformPrefix()

StringRef clang::DarwinSDKInfo::getPlatformPrefix ( const llvm::Triple & Triple) const
inline

Definition at line 211 of file DarwinSDKInfo.h.

◆ getVersion()

const llvm::VersionTuple & clang::DarwinSDKInfo::getVersion ( ) const
inline

Definition at line 199 of file DarwinSDKInfo.h.

◆ getVersionMapping()

const RelatedTargetVersionMapping * clang::DarwinSDKInfo::getVersionMapping ( OSEnvPair Kind) const
inline

Definition at line 228 of file DarwinSDKInfo.h.

Referenced by handleAvailabilityAttr(), and shouldInferAvailabilityAttribute().

◆ parseDarwinSDKSettingsJSON()

◆ supportsTriple()

bool clang::DarwinSDKInfo::supportsTriple ( const llvm::Triple & Triple) const
inline

Definition at line 207 of file DarwinSDKInfo.h.


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