clang  14.0.0git
Public Attributes | List of all members
clang::TargetOptions Class Reference

Options for controlling the target. More...

#include "clang/Basic/TargetOptions.h"

Collaboration diagram for clang::TargetOptions:
Collaboration graph
[legend]

Public Attributes

std::string Triple
 The name of the target triple to compile for. More...
 
std::string HostTriple
 When compiling for the device side, contains the triple used to compile for the host. More...
 
std::string CPU
 If given, the name of the target CPU to generate code for. More...
 
std::string TuneCPU
 If given, the name of the target CPU to tune code for. More...
 
std::string FPMath
 If given, the unit to use for floating point math. More...
 
std::string ABI
 If given, the name of the target ABI to use. More...
 
llvm::EABI EABIVersion
 The EABI version to use. More...
 
std::string LinkerVersion
 If given, the version string of the linker in use. More...
 
std::vector< std::stringFeaturesAsWritten
 The list of target specific features to enable or disable, as written on the command line. More...
 
std::vector< std::stringFeatures
 The list of target specific features to enable or disable – this should be a list of strings starting with by '+' or '-'. More...
 
llvm::StringMap< boolFeatureMap
 The map of which features have been enabled disabled based on the command line. More...
 
llvm::StringMap< boolOpenCLFeaturesMap
 Supported OpenCL extensions and optional core features. More...
 
std::vector< std::stringOpenCLExtensionsAsWritten
 The list of OpenCL extensions to enable or disable, as written on the command line. More...
 
bool ForceEnableInt128 = false
 If given, enables support for __int128_t and __uint128_t types. More...
 
bool NVPTXUseShortPointers = false
 If enabled, use 32-bit pointers for accessing const/local/shared address space. More...
 
bool AllowAMDGPUUnsafeFPAtomics = false
 If enabled, allow AMDGPU unsafe floating point atomics. More...
 
std::string CodeModel
 
llvm::VersionTuple SDKVersion
 The version of the SDK which was used during the compilation. More...
 

Detailed Description

Options for controlling the target.

Definition at line 26 of file TargetOptions.h.

Member Data Documentation

◆ ABI

std::string clang::TargetOptions::ABI

If given, the name of the target ABI to use.

Definition at line 45 of file TargetOptions.h.

◆ AllowAMDGPUUnsafeFPAtomics

bool clang::TargetOptions::AllowAMDGPUUnsafeFPAtomics = false

If enabled, allow AMDGPU unsafe floating point atomics.

Definition at line 79 of file TargetOptions.h.

Referenced by clang::targets::AMDGPUTargetInfo::AMDGPUTargetInfo().

◆ CodeModel

std::string clang::TargetOptions::CodeModel

Definition at line 85 of file TargetOptions.h.

Referenced by FixupInvocation().

◆ CPU

std::string clang::TargetOptions::CPU

If given, the name of the target CPU to generate code for.

Definition at line 36 of file TargetOptions.h.

Referenced by clang::ASTContext::getFunctionFeatureMap(), and runThinLTOBackend().

◆ EABIVersion

llvm::EABI clang::TargetOptions::EABIVersion

The EABI version to use.

Definition at line 48 of file TargetOptions.h.

Referenced by clang::targets::AArch64TargetInfo::AArch64TargetInfo(), and clang::targets::ARMTargetInfo::ARMTargetInfo().

◆ FeatureMap

llvm::StringMap<bool> clang::TargetOptions::FeatureMap

The map of which features have been enabled disabled based on the command line.

Definition at line 62 of file TargetOptions.h.

Referenced by getCudaArch(), and clang::ASTContext::getFunctionFeatureMap().

◆ Features

std::vector<std::string> clang::TargetOptions::Features

The list of target specific features to enable or disable – this should be a list of strings starting with by '+' or '-'.

Definition at line 58 of file TargetOptions.h.

Referenced by clang::ASTContext::getFunctionFeatureMap(), and runThinLTOBackend().

◆ FeaturesAsWritten

std::vector<std::string> clang::TargetOptions::FeaturesAsWritten

The list of target specific features to enable or disable, as written on the command line.

Definition at line 54 of file TargetOptions.h.

Referenced by clang::targets::ARMTargetInfo::ARMTargetInfo(), checkTargetOptions(), clang::ASTContext::getFunctionFeatureMap(), and clang::targets::NVPTXTargetInfo::NVPTXTargetInfo().

◆ ForceEnableInt128

bool clang::TargetOptions::ForceEnableInt128 = false

If given, enables support for __int128_t and __uint128_t types.

Definition at line 72 of file TargetOptions.h.

Referenced by clang::TargetInfo::hasInt128Type().

◆ FPMath

std::string clang::TargetOptions::FPMath

If given, the unit to use for floating point math.

Definition at line 42 of file TargetOptions.h.

◆ HostTriple

std::string clang::TargetOptions::HostTriple

When compiling for the device side, contains the triple used to compile for the host.

Definition at line 33 of file TargetOptions.h.

Referenced by clang::targets::NVPTXTargetInfo::NVPTXTargetInfo().

◆ LinkerVersion

std::string clang::TargetOptions::LinkerVersion

If given, the version string of the linker in use.

Definition at line 51 of file TargetOptions.h.

◆ NVPTXUseShortPointers

bool clang::TargetOptions::NVPTXUseShortPointers = false

If enabled, use 32-bit pointers for accessing const/local/shared address space.

Definition at line 76 of file TargetOptions.h.

Referenced by clang::targets::NVPTXTargetInfo::NVPTXTargetInfo().

◆ OpenCLExtensionsAsWritten

std::vector<std::string> clang::TargetOptions::OpenCLExtensionsAsWritten

The list of OpenCL extensions to enable or disable, as written on the command line.

Definition at line 69 of file TargetOptions.h.

◆ OpenCLFeaturesMap

llvm::StringMap<bool> clang::TargetOptions::OpenCLFeaturesMap

Supported OpenCL extensions and optional core features.

Definition at line 65 of file TargetOptions.h.

Referenced by clang::TargetInfo::getSupportedOpenCLOpts().

◆ SDKVersion

llvm::VersionTuple clang::TargetOptions::SDKVersion

The version of the SDK which was used during the compilation.

The option is used for two different purposes:

  • on darwin the version is propagated to LLVM where it's used to support SDK Version metadata (See D55673).
  • CUDA compilation uses it to control parts of CUDA compilation in clang that depend on specific version of the CUDA SDK.

Definition at line 93 of file TargetOptions.h.

Referenced by GenerateTargetArgs(), clang::TargetInfo::getSDKVersion(), and ParseTargetArgs().

◆ Triple

std::string clang::TargetOptions::Triple

The name of the target triple to compile for.

Definition at line 29 of file TargetOptions.h.

Referenced by clang::CodeGenAction::ExecuteAction(), FixupInvocation(), and HasARCRuntime().

◆ TuneCPU

std::string clang::TargetOptions::TuneCPU

If given, the name of the target CPU to tune code for.

Definition at line 39 of file TargetOptions.h.


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