clang 22.0.0git
clang::TargetInfo Class Referenceabstract

Exposes information about the current target. More...

#include "clang/Basic/TargetInfo.h"

Inheritance diagram for clang::TargetInfo:
[legend]

Classes

struct  AddlRegName
class  BranchProtectionInfo
struct  ConstraintInfo
struct  GCCRegAlias

Public Types

enum  BuiltinVaListKind {
  CharPtrBuiltinVaList = 0 , VoidPtrBuiltinVaList , AArch64ABIBuiltinVaList , PowerABIBuiltinVaList ,
  X86_64ABIBuiltinVaList , AAPCSABIBuiltinVaList , SystemZBuiltinVaList , HexagonBuiltinVaList ,
  XtensaABIBuiltinVaList
}
 The different kinds of __builtin_va_list types defined by the target implementation. More...
enum class  ArmStreamingKind { NotStreaming , StreamingCompatible , Streaming }
enum  { ARM_LDREX_B = (1 << 0) , ARM_LDREX_H = (1 << 1) , ARM_LDREX_W = (1 << 2) , ARM_LDREX_D = (1 << 3) }
 For ARM targets returns a mask defining which data sizes are suitable for __builtin_arm_ldrex and __builtin_arm_strex. More...
enum  CallingConvCheckResult { CCCR_OK , CCCR_Warning , CCCR_Ignore , CCCR_Error }
enum  CallingConvKind { CCK_Default , CCK_ClangABI4OrPS4 , CCK_MicrosoftWin64 }
Public Types inherited from clang::TransferrableTargetInfo
enum  IntType {
  NoInt = 0 , SignedChar , UnsignedChar , SignedShort ,
  UnsignedShort , SignedInt , UnsignedInt , SignedLong ,
  UnsignedLong , SignedLongLong , UnsignedLongLong
}
 ===-— Target Data Type Query Methods ----------------------------—===// More...

Public Member Functions

virtual ~TargetInfo ()
TargetOptionsgetTargetOpts () const
 Retrieve the target options.
IntType getSizeType () const
IntType getSignedSizeType () const
IntType getIntMaxType () const
IntType getUIntMaxType () const
IntType getPtrDiffType (LangAS AddrSpace) const
IntType getUnsignedPtrDiffType (LangAS AddrSpace) const
IntType getIntPtrType () const
IntType getUIntPtrType () const
IntType getWCharType () const
IntType getWIntType () const
IntType getChar16Type () const
IntType getChar32Type () const
IntType getInt64Type () const
IntType getUInt64Type () const
IntType getInt16Type () const
IntType getUInt16Type () const
IntType getSigAtomicType () const
IntType getProcessIDType () const
bool doUnsignedFixedPointTypesHavePadding () const
 In the event this target uses the same number of fractional bits for its unsigned types as it does with its signed counterparts, there will be exactly one bit of padding.
unsigned getTypeWidth (IntType T) const
 Return the width (in bits) of the specified integer type enum.
virtual IntType getIntTypeByWidth (unsigned BitWidth, bool IsSigned) const
 Return integer type with specified width.
virtual IntType getLeastIntTypeByWidth (unsigned BitWidth, bool IsSigned) const
 Return the smallest integer type with at least the specified width.
FloatModeKind getRealTypeByWidth (unsigned BitWidth, FloatModeKind ExplicitType) const
 Return floating point type with specified width.
unsigned getTypeAlign (IntType T) const
 Return the alignment (in bits) of the specified integer type enum.
uint64_t getPointerWidth (LangAS AddrSpace) const
 Return the width of pointers on this target, for the specified address space.
uint64_t getPointerAlign (LangAS AddrSpace) const
virtual uint64_t getMaxPointerWidth () const
 Return the maximum width of pointers on this target.
virtual uint64_t getNullPointerValue (LangAS AddrSpace) const
 Get integer value for null pointer.
virtual bool isAddressSpaceSupersetOf (LangAS A, LangAS B) const
 Returns true if an address space can be safely converted to another.
unsigned getBoolWidth () const
 Return the size of '_Bool' and C++ 'bool' for this target, in bits.
unsigned getBoolAlign () const
 Return the alignment of '_Bool' and C++ 'bool' for this target.
unsigned getCharWidth () const
unsigned getCharAlign () const
unsigned getShortWidth () const
 getShortWidth/Align - Return the size of 'signed short' and 'unsigned short' for this target, in bits.
unsigned getShortAlign () const
unsigned getIntWidth () const
 getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for this target, in bits.
unsigned getIntAlign () const
unsigned getLongWidth () const
 getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' for this target, in bits.
unsigned getLongAlign () const
unsigned getLongLongWidth () const
 getLongLongWidth/Align - Return the size of 'signed long long' and 'unsigned long long' for this target, in bits.
unsigned getLongLongAlign () const
unsigned getInt128Align () const
 getInt128Align() - Returns the alignment of Int128.
unsigned getBitIntMaxAlign () const
 getBitIntMaxAlign() - Returns the maximum possible alignment of '_BitInt' and 'unsigned _BitInt'.
unsigned getBitIntWidth (unsigned NumBits) const
 getBitIntAlign/Width - Return aligned size of '_BitInt' and 'unsigned _BitInt' for this target, in bits.
unsigned getBitIntAlign (unsigned NumBits) const
unsigned getShortAccumWidth () const
 getShortAccumWidth/Align - Return the size of 'signed short _Accum' and 'unsigned short _Accum' for this target, in bits.
unsigned getShortAccumAlign () const
unsigned getAccumWidth () const
 getAccumWidth/Align - Return the size of 'signed _Accum' and 'unsigned _Accum' for this target, in bits.
unsigned getAccumAlign () const
unsigned getLongAccumWidth () const
 getLongAccumWidth/Align - Return the size of 'signed long _Accum' and 'unsigned long _Accum' for this target, in bits.
unsigned getLongAccumAlign () const
unsigned getShortFractWidth () const
 getShortFractWidth/Align - Return the size of 'signed short _Fract' and 'unsigned short _Fract' for this target, in bits.
unsigned getShortFractAlign () const
unsigned getFractWidth () const
 getFractWidth/Align - Return the size of 'signed _Fract' and 'unsigned _Fract' for this target, in bits.
unsigned getFractAlign () const
unsigned getLongFractWidth () const
 getLongFractWidth/Align - Return the size of 'signed long _Fract' and 'unsigned long _Fract' for this target, in bits.
unsigned getLongFractAlign () const
unsigned getShortAccumScale () const
 getShortAccumScale/IBits - Return the number of fractional/integral bits in a 'signed short _Accum' type.
unsigned getShortAccumIBits () const
unsigned getAccumScale () const
 getAccumScale/IBits - Return the number of fractional/integral bits in a 'signed _Accum' type.
unsigned getAccumIBits () const
unsigned getLongAccumScale () const
 getLongAccumScale/IBits - Return the number of fractional/integral bits in a 'signed long _Accum' type.
unsigned getLongAccumIBits () const
unsigned getUnsignedShortAccumScale () const
 getUnsignedShortAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned short _Accum' type.
unsigned getUnsignedShortAccumIBits () const
unsigned getUnsignedAccumScale () const
 getUnsignedAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned _Accum' type.
unsigned getUnsignedAccumIBits () const
unsigned getUnsignedLongAccumScale () const
 getUnsignedLongAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned long _Accum' type.
unsigned getUnsignedLongAccumIBits () const
unsigned getShortFractScale () const
 getShortFractScale - Return the number of fractional bits in a 'signed short _Fract' type.
unsigned getFractScale () const
 getFractScale - Return the number of fractional bits in a 'signed _Fract' type.
unsigned getLongFractScale () const
 getLongFractScale - Return the number of fractional bits in a 'signed long _Fract' type.
unsigned getUnsignedShortFractScale () const
 getUnsignedShortFractScale - Return the number of fractional bits in a 'unsigned short _Fract' type.
unsigned getUnsignedFractScale () const
 getUnsignedFractScale - Return the number of fractional bits in a 'unsigned _Fract' type.
unsigned getUnsignedLongFractScale () const
 getUnsignedLongFractScale - Return the number of fractional bits in a 'unsigned long _Fract' type.
virtual bool hasInt128Type () const
 Determine whether the __int128 type is supported on this target.
virtual bool hasBitIntType () const
 Determine whether the _BitInt type is supported on this target.
virtual size_t getMaxBitIntWidth () const
virtual bool hasFastHalfType () const
 Determine whether the target has fast native support for operations on half types.
virtual bool allowHalfArgsAndReturns () const
 Whether half args and returns are supported.
virtual bool hasFloat128Type () const
 Determine whether the __float128 type is supported on this target.
virtual bool hasFloat16Type () const
 Determine whether the _Float16 type is supported on this target.
virtual bool hasBFloat16Type () const
 Determine whether the _BFloat16 type is supported on this target.
virtual bool hasFullBFloat16Type () const
 Determine whether the BFloat type is fully supported on this target, i.e arithemtic operations.
virtual bool hasIbm128Type () const
 Determine whether the __ibm128 type is supported on this target.
virtual bool hasLongDoubleType () const
 Determine whether the long double type is supported on this target.
virtual bool hasFPReturn () const
 Determine whether return of a floating point value is supported on this target.
virtual bool hasStrictFP () const
 Determine whether constrained floating point is supported on this target.
unsigned getSuitableAlign () const
 Return the alignment that is the largest alignment ever used for any scalar/SIMD data type on the target machine you are compiling for (including types with an extended alignment requirement).
unsigned getDefaultAlignForAttributeAligned () const
 Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified.
virtual unsigned getMinGlobalAlign (uint64_t Size, bool HasNonWeakDef) const
 getMinGlobalAlign - Return the minimum alignment of a global variable, unless its alignment is explicitly reduced via attributes.
unsigned getNewAlign () const
 Return the largest alignment for which a suitably-sized allocation with '::operator new(size_t)' is guaranteed to produce a correctly-aligned pointer.
unsigned getWCharWidth () const
 getWCharWidth/Align - Return the size of 'wchar_t' for this target, in bits.
unsigned getWCharAlign () const
unsigned getChar16Width () const
 getChar16Width/Align - Return the size of 'char16_t' for this target, in bits.
unsigned getChar16Align () const
unsigned getChar32Width () const
 getChar32Width/Align - Return the size of 'char32_t' for this target, in bits.
unsigned getChar32Align () const
unsigned getHalfWidth () const
 getHalfWidth/Align/Format - Return the size/align/format of 'half'.
unsigned getHalfAlign () const
const llvm::fltSemantics & getHalfFormat () const
unsigned getFloatWidth () const
 getFloatWidth/Align/Format - Return the size/align/format of 'float'.
unsigned getFloatAlign () const
const llvm::fltSemantics & getFloatFormat () const
unsigned getBFloat16Width () const
 getBFloat16Width/Align/Format - Return the size/align/format of '__bf16'.
unsigned getBFloat16Align () const
const llvm::fltSemantics & getBFloat16Format () const
unsigned getDoubleWidth () const
 getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
unsigned getDoubleAlign () const
const llvm::fltSemantics & getDoubleFormat () const
unsigned getLongDoubleWidth () const
 getLongDoubleWidth/Align/Format - Return the size/align/format of 'long double'.
unsigned getLongDoubleAlign () const
const llvm::fltSemantics & getLongDoubleFormat () const
unsigned getFloat128Width () const
 getFloat128Width/Align/Format - Return the size/align/format of '__float128'.
unsigned getFloat128Align () const
const llvm::fltSemantics & getFloat128Format () const
unsigned getIbm128Width () const
 getIbm128Width/Align/Format - Return the size/align/format of '__ibm128'.
unsigned getIbm128Align () const
const llvm::fltSemantics & getIbm128Format () const
virtual const char * getLongDoubleMangling () const
 Return the mangled code of long double.
virtual const char * getFloat128Mangling () const
 Return the mangled code of __float128.
virtual const char * getIbm128Mangling () const
 Return the mangled code of __ibm128.
virtual const char * getBFloat16Mangling () const
 Return the mangled code of bfloat.
virtual LangOptions::FPEvalMethodKind getFPEvalMethod () const
 Return the value for the C99 FLT_EVAL_METHOD macro.
virtual bool supportSourceEvalMethod () const
unsigned getLargeArrayMinWidth () const
unsigned getLargeArrayAlign () const
unsigned getMaxAtomicPromoteWidth () const
 Return the maximum width lock-free atomic operation which will ever be supported for the given target.
unsigned getMaxAtomicInlineWidth () const
 Return the maximum width lock-free atomic operation which can be inlined given the supported features of the given target.
virtual void setMaxAtomicWidth ()
 Set the maximum inline or promote width lock-free atomic operation for the given target.
virtual bool hasBuiltinAtomic (uint64_t AtomicSizeInBits, uint64_t AlignmentInBits) const
 Returns true if the given target supports lock-free atomic operations at the specified width and alignment.
unsigned getMaxVectorAlign () const
 Return the maximum vector alignment supported for the given target.
unsigned getMaxOpenCLWorkGroupSize () const
virtual unsigned getExnObjectAlignment () const
 Return the alignment (in bits) of the thrown exception object.
unsigned getIntMaxTWidth () const
 Return the size of intmax_t and uintmax_t for this target, in bits.
virtual unsigned getUnwindWordWidth () const
virtual unsigned getRegisterWidth () const
 Return the "preferred" register width on this target.
bool hasUnalignedAccess () const
 Return true iff unaligned accesses are a single instruction (rather than a synthesized sequence).
bool hasCheapUnalignedBitFieldAccess () const
 Return true iff unaligned accesses are cheap.
const char * getUserLabelPrefix () const
 Returns the default value of the USER_LABEL_PREFIX macro, which is the prefix given to user symbols by default.
const char * getMCountName () const
 Returns the name of the mcount instrumentation function.
bool useSignedCharForObjCBool () const
 Check if the Objective-C built-in boolean type should be signed char.
void noSignedCharForObjCBool ()
bool useBitFieldTypeAlignment () const
 Check whether the alignment of bit-field types is respected when laying out structures.
bool useZeroLengthBitfieldAlignment () const
 Check whether zero length bitfields should force alignment of the next member.
bool useLeadingZeroLengthBitfield () const
 Check whether zero length bitfield alignment is respected if they are leading members.
unsigned getZeroLengthBitfieldBoundary () const
 Get the fixed alignment value in bits for a member that follows a zero length bitfield.
unsigned getLargestOverSizedBitfieldContainer () const
unsigned getMaxAlignedAttribute () const
 Get the maximum alignment in bits for a static variable with aligned attribute.
bool useExplicitBitFieldAlignment () const
 Check whether explicit bitfield alignment attributes should be.
bool hasAlignMac68kSupport () const
 Check whether this target support '#pragma options align=mac68k'.
const char * getTypeConstantSuffix (IntType T) const
 Return the constant suffix for the specified integer type enum.
bool useObjCFPRetForRealType (FloatModeKind T) const
 Check whether the given real type should use the "fpret" flavor of Objective-C message passing on this target.
bool useObjCFP2RetForComplexLongDouble () const
 Check whether _Complex long double should use the "fp2ret" flavor of Objective-C message passing on this target.
virtual bool useFP16ConversionIntrinsics () const
 Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp16.
bool useAddressSpaceMapMangling () const
 Specify if mangling based on address space map should be used or not for language specific address spaces.
virtual void getTargetDefines (const LangOptions &Opts, MacroBuilder &Builder) const =0
 ===-— Other target property query methods -----------------------—===//
virtual llvm::SmallVector< Builtin::InfosShardgetTargetBuiltins () const =0
 Return information about target-specific builtins for the current primary target, and info about which builtins are non-portable across the current set of primary and secondary targets.
virtual std::optional< std::pair< unsigned, unsigned > > getVScaleRange (const LangOptions &LangOpts, ArmStreamingKind Mode, llvm::StringMap< bool > *FeatureMap=nullptr) const
 Returns target-specific min and max values VScale_Range.
virtual bool isCLZForZeroUndef () const
 The __builtin_clz* and __builtin_ctz* built-in functions are specified to have undefined results for zero inputs, but on targets that support these operations in a way that provides well-defined results for zero without loss of performance, it is a good idea to avoid optimizing based on that undef behavior.
virtual BuiltinVaListKind getBuiltinVaListKind () const =0
 Returns the kind of __builtin_va_list type that should be used with this target.
bool hasBuiltinMSVaList () const
 Returns whether or not type __builtin_ms_va_list type is available on this target.
bool hasAArch64ACLETypes () const
 Returns whether or not the AArch64 ACLE built-in types are available on this target.
bool hasRISCVVTypes () const
 Returns whether or not the RISC-V V built-in types are available on this target.
uint32_t getARMCDECoprocMask () const
 For ARM targets returns a mask defining which coprocessors are configured as Custom Datapath.
virtual unsigned getARMLDREXMask () const
bool isValidClobber (StringRef Name) const
 Returns whether the passed in string is a valid clobber in an inline asm statement.
virtual bool isValidGCCRegisterName (StringRef Name) const
 Returns whether the passed in string is a valid register name according to GCC.
StringRef getNormalizedGCCRegisterName (StringRef Name, bool ReturnCanonical=false) const
 Returns the "normalized" GCC register name.
virtual bool isSPRegName (StringRef) const
virtual StringRef getConstraintRegister (StringRef Constraint, StringRef Expression) const
 Extracts a register from the passed constraint (if it is a single-register constraint) and the asm label expression related to a variable in the input or output list of an inline asm statement.
virtual bool validateGlobalRegisterVariable (StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const
 Validate register name used for global register variables.
bool validateOutputConstraint (ConstraintInfo &Info) const
bool validateInputConstraint (MutableArrayRef< ConstraintInfo > OutputConstraints, ConstraintInfo &info) const
virtual bool validateOutputSize (const llvm::StringMap< bool > &FeatureMap, StringRef, unsigned) const
virtual bool validateInputSize (const llvm::StringMap< bool > &FeatureMap, StringRef, unsigned) const
virtual bool validateConstraintModifier (StringRef, char, unsigned, std::string &) const
virtual bool validateAsmConstraint (const char *&Name, TargetInfo::ConstraintInfo &info) const =0
bool resolveSymbolicName (const char *&Name, ArrayRef< ConstraintInfo > OutputConstraints, unsigned &Index) const
virtual std::string convertConstraint (const char *&Constraint) const
virtual std::optional< std::string > handleAsmEscapedChar (char C) const
 Replace some escaped characters with another string based on target-specific rules.
virtual std::string_view getClobbers () const =0
 Returns a string of target-specific clobbers, in LLVM format.
virtual bool isNan2008 () const
 Returns true if NaN encoding is IEEE 754-2008.
const llvm::Triple & getTriple () const
 Returns the target triple of the primary target.
virtual std::optional< std::string > getTargetID () const
 Returns the target ID if supported.
const char * getDataLayoutString () const
virtual bool hasProtectedVisibility () const
 Does this target support "protected" visibility?
virtual bool shouldDLLImportComdatSymbols () const
 Does this target aim for semantic compatibility with Microsoft C++ code using dllimport/export attributes?
virtual bool hasPS4DLLImportExport () const
virtual void adjust (DiagnosticsEngine &Diags, LangOptions &Opts, const TargetInfo *Aux)
 Set forced language options.
virtual bool initFeatureMap (llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeatureVec) const
 Initialize the map with the default set of target features for the CPU this should include all legal feature strings on the target.
virtual StringRef getABI () const
 Get the ABI currently in use.
TargetCXXABI getCXXABI () const
 Get the C++ ABI currently in use.
bool shouldUseMicrosoftCCforMangling () const
 Should the Microsoft mangling scheme be used for C Calling Convention.
virtual bool setCPU (const std::string &Name)
 Target the specified CPU.
virtual void fillValidCPUList (SmallVectorImpl< StringRef > &Values) const
 Fill a SmallVectorImpl with the valid values to setCPU.
virtual void fillValidTuneCPUList (SmallVectorImpl< StringRef > &Values) const
 Fill a SmallVectorImpl with the valid values for tuning CPU.
virtual bool isValidCPUName (StringRef Name) const
 Determine whether this TargetInfo supports the given CPU name.
virtual bool isValidTuneCPUName (StringRef Name) const
 Determine whether this TargetInfo supports the given CPU name for tuning.
virtual ParsedTargetAttr parseTargetAttr (StringRef Str) const
virtual bool supportsTargetAttributeTune () const
 Determine whether this TargetInfo supports tune in target attribute.
virtual bool setABI (const std::string &Name)
 Use the specified ABI.
virtual bool setFPMath (StringRef Name)
 Use the specified unit for FP math.
virtual bool hasFeatureEnabled (const llvm::StringMap< bool > &Features, StringRef Name) const
 Check if target has a given feature enabled.
virtual void setFeatureEnabled (llvm::StringMap< bool > &Features, StringRef Name, bool Enabled) const
 Enable or disable a specific target feature; the feature name must be valid.
virtual bool isValidFeatureName (StringRef Feature) const
 Determine whether this TargetInfo supports the given feature.
virtual bool doesFeatureAffectCodeGen (StringRef Feature) const
 Returns true if feature has an impact on target code generation.
virtual bool isBranchProtectionSupportedArch (StringRef Arch) const
 Determine if the Architecture in this TargetInfo supports branch protection.
virtual bool validateBranchProtection (StringRef Spec, StringRef Arch, BranchProtectionInfo &BPI, const LangOptions &LO, StringRef &Err) const
 Determine if this TargetInfo supports the given branch protection specification.
virtual bool handleTargetFeatures (std::vector< std::string > &Features, DiagnosticsEngine &Diags)
 Perform initialization based on the user configured set of features (e.g., +sse4).
virtual bool hasFeature (StringRef Feature) const
 Determine whether the given target has the given feature.
bool isReadOnlyFeature (StringRef Feature) const
 Determine whether the given target feature is read only.
bool supportsMultiVersioning () const
 Identify whether this target supports multiversioning of functions, which requires support for cpu_supports and cpu_is functionality.
bool supportsIFunc () const
 Identify whether this target supports IFuncs.
virtual bool supportsCpuSupports () const
virtual bool supportsCpuIs () const
virtual bool supportsCpuInit () const
virtual bool validateCpuSupports (StringRef Name) const
virtual llvm::APInt getFMVPriority (ArrayRef< StringRef > Features) const
virtual bool validateCpuIs (StringRef Name) const
virtual bool validateCPUSpecificCPUDispatch (StringRef Name) const
virtual char CPUSpecificManglingCharacter (StringRef Name) const
virtual StringRef getCPUSpecificTuneName (StringRef Name) const
virtual void getCPUSpecificCPUDispatchFeatures (StringRef Name, llvm::SmallVectorImpl< StringRef > &Features) const
virtual std::optional< unsignedgetCPUCacheLineSize () const
unsigned getRegParmMax () const
bool isTLSSupported () const
 Whether the target supports thread-local storage.
unsigned getMaxTLSAlign () const
 Return the maximum alignment (in bits) of a TLS variable.
bool isVLASupported () const
 Whether target supports variable-length arrays.
bool isSEHTrySupported () const
 Whether the target supports SEH __try.
bool hasNoAsmVariants () const
 Return true if {|} are normal characters in the asm string.
virtual int getEHDataRegisterNumber (unsigned RegNo) const
 Return the register number that __builtin_eh_return_regno would return with the specified argument.
virtual const char * getStaticInitSectionSpecifier () const
 Return the section to use for C++ static initialization functions.
const LangASMapgetAddressSpaceMap () const
unsigned getTargetAddressSpace (LangAS AS) const
virtual bool validatePointerAuthKey (const llvm::APSInt &value) const
 Determine whether the given pointer-authentication key is valid.
virtual LangAS getOpenCLBuiltinAddressSpace (unsigned AS) const
 Map from the address space field in builtin description strings to the language address space.
virtual LangAS getCUDABuiltinAddressSpace (unsigned AS) const
 Map from the address space field in builtin description strings to the language address space.
virtual std::optional< LangASgetConstantAddressSpace () const
 Return an AST address space which can be used opportunistically for constant global memory.
virtual const llvm::omp::GV & getGridValue () const
StringRef getPlatformName () const
 Retrieve the name of the platform as it is used in the availability attribute.
VersionTuple getPlatformMinVersion () const
 Retrieve the minimum desired version of the platform, to which the program should be compiled.
bool isBigEndian () const
bool isLittleEndian () const
virtual bool supportsExtendIntArgs () const
 Whether the option -fextend-arguments={32,64} is supported on the target.
virtual bool checkArithmeticFenceSupported () const
 Controls if __arithmetic_fence is supported in the targeted backend.
virtual CallingConv getDefaultCallingConv () const
 Gets the default calling convention for the given target.
AtomicOptions getAtomicOpts () const
 Get the default atomic options.
virtual CallingConvCheckResult checkCallingConvention (CallingConv CC) const
 Determines whether a given calling convention is valid for the target.
virtual CallingConvKind getCallingConvKind (bool ClangABICompat4) const
virtual bool areDefaultedSMFStillPOD (const LangOptions &) const
 Controls whether explicitly defaulted (= default) special member functions disqualify something from being POD-for-the-purposes-of-layout.
virtual bool callGlobalDeleteInDeletingDtor (const LangOptions &) const
 Controls whether global operator delete is called by the deleting destructor or at the point where ::delete was called.
virtual bool hasSjLjLowering () const
 Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp.
virtual bool checkCFProtectionBranchSupported (DiagnosticsEngine &Diags) const
 Check if the target supports CFProtection branch.
virtual CFBranchLabelSchemeKind getDefaultCFBranchLabelScheme () const
 Get the target default CFBranchLabelScheme scheme.
virtual bool checkCFBranchLabelSchemeSupported (const CFBranchLabelSchemeKind Scheme, DiagnosticsEngine &Diags) const
virtual bool checkCFProtectionReturnSupported (DiagnosticsEngine &Diags) const
 Check if the target supports CFProtection return.
virtual bool allowsLargerPreferedTypeAlignment () const
 Whether target allows to overalign ABI-specified preferred alignment.
virtual bool defaultsToAIXPowerAlignment () const
 Whether target defaults to the power alignment rules of AIX.
virtual void setSupportedOpenCLOpts ()
 Set supported OpenCL extensions and optional core features.
virtual void supportAllOpenCLOpts (bool V=true)
virtual void setCommandLineOpenCLOpts ()
 Set supported OpenCL extensions as written on command line.
llvm::StringMap< bool > & getSupportedOpenCLOpts ()
 Get supported OpenCL extensions and optional core features.
const llvm::StringMap< bool > & getSupportedOpenCLOpts () const
 Get const supported OpenCL extensions and optional core features.
virtual LangAS getOpenCLTypeAddrSpace (OpenCLTypeKind TK) const
 Get address space for OpenCL type.
virtual unsigned getVtblPtrAddressSpace () const
virtual std::optional< unsignedgetDWARFAddressSpace (unsigned AddressSpace) const
const llvm::VersionTuple & getSDKVersion () const
virtual bool validateTarget (DiagnosticsEngine &Diags) const
 Check the target is valid after it is fully initialized.
virtual bool validateOpenCLTarget (const LangOptions &Opts, DiagnosticsEngine &Diags) const
 Check that OpenCL target has valid options setting based on OpenCL version.
virtual void setAuxTarget (const TargetInfo *Aux)
bool hasMicrosoftRecordLayout () const
virtual bool allowDebugInfoForExternalRef () const
 Whether target allows debuginfo types for decl only variables/functions.
const llvm::Triple * getDarwinTargetVariantTriple () const
 Returns the darwin target variant triple, the variant of the deployment target for which the code is being compiled.
std::optional< VersionTuple > getDarwinTargetVariantSDKVersion () const
 Returns the version of the darwin target variant SDK which was used during the compilation if one was specified, or an empty version otherwise.
virtual bool hasHIPImageSupport () const
 Whether to support HIP image/texture API's.
virtual std::pair< unsigned, unsignedhardwareInterferenceSizes () const
 The first value in the pair is the minimum offset between two objects to avoid false sharing (destructive interference).

Static Public Member Functions

static TargetInfoCreateTargetInfo (DiagnosticsEngine &Diags, TargetOptions &Opts)
 Construct a target for the given options.
static IntType getCorrespondingUnsignedType (IntType T)
static bool isTypeSigned (IntType T)
 Returns true if the type is signed; false otherwise.
static const char * getTypeName (IntType T)
 Return the user string for the specified integer type enum.
static const char * getTypeFormatModifier (IntType T)
 Return the printf format modifier for the specified integer type enum.

Protected Member Functions

 TargetInfo (const llvm::Triple &T)
void resetDataLayout (StringRef DL, const char *UserLabelPrefix="")
void copyAuxTarget (const TargetInfo *Aux)
 Copy type and layout related info.
virtual uint64_t getPointerWidthV (LangAS AddrSpace) const
virtual uint64_t getPointerAlignV (LangAS AddrSpace) const
virtual enum IntType getPtrDiffTypeV (LangAS AddrSpace) const
virtual ArrayRef< const char * > getGCCRegNames () const =0
virtual ArrayRef< GCCRegAliasgetGCCRegAliases () const =0
virtual ArrayRef< AddlRegNamegetGCCAddlRegNames () const

Protected Attributes

bool BigEndian
bool TLSSupported
bool VLASupported
bool NoAsmVariants
bool HasFastHalfType
bool HalfArgsAndReturns
bool HasFloat128
bool HasFloat16
bool HasBFloat16
bool HasFullBFloat16
bool HasIbm128
bool HasLongDouble
bool HasFPReturn
bool HasStrictFP
unsigned char MaxAtomicPromoteWidth
unsigned char MaxAtomicInlineWidth
std::string DataLayoutString
const char * UserLabelPrefix
const char * MCountName
unsigned char RegParmMax
unsigned char SSERegParmMax
TargetCXXABI TheCXXABI
bool UseMicrosoftManglingForC = false
const LangASMapAddrSpaceMap
StringRef PlatformName
VersionTuple PlatformMinVersion
unsigned HasAlignMac68kSupport: 1
unsigned RealTypeUsesObjCFPRetMask: llvm::BitWidth<FloatModeKind>
unsigned ComplexLongDoubleUsesFP2Ret: 1
unsigned HasBuiltinMSVaList: 1
unsigned HasAArch64ACLETypes: 1
unsigned HasRISCVVTypes: 1
unsigned AllowAMDGPUUnsafeFPAtomics: 1
unsigned HasUnalignedAccess: 1
unsigned ARMCDECoprocMask: 8
unsigned MaxOpenCLWorkGroupSize
std::optional< unsignedMaxBitIntWidth
std::optional< llvm::Triple > DarwinTargetVariantTriple
bool HasMicrosoftRecordLayout = false
llvm::StringSet ReadOnlyFeatures
AtomicOptions AtomicOpts
bool UseAddrSpaceMapMangling
 Specify if mangling based on address space map should be used or not for language specific address spaces.
Protected Attributes inherited from clang::TransferrableTargetInfo
IntType SizeType
IntType IntMaxType
IntType PtrDiffType
IntType IntPtrType
IntType WCharType
IntType WIntType
IntType Char16Type
IntType Char32Type
IntType Int64Type
IntType Int16Type
IntType SigAtomicType
IntType ProcessIDType
unsigned UseSignedCharForObjCBool: 1
 Whether Objective-C's built-in boolean type should be signed char.
unsigned UseBitFieldTypeAlignment: 1
 Control whether the alignment of bit-field types is respected when laying out structures.
unsigned UseZeroLengthBitfieldAlignment: 1
 Whether zero length bitfields (e.g., int : 0;) force alignment of the next bitfield.
unsigned UseLeadingZeroLengthBitfield: 1
 Whether zero length bitfield alignment is respected if they are the leading members.
unsigned UseExplicitBitFieldAlignment: 1
 Whether explicit bit field alignment attributes are honored.
unsigned ZeroLengthBitfieldBoundary
 If non-zero, specifies a fixed alignment value for bitfields that follow zero length bitfield, regardless of the zero length bitfield type.
unsigned LargestOverSizedBitfieldContainer
 The largest container size which should be used for an over-sized bitfield, in bits.
unsigned MaxAlignedAttribute
 If non-zero, specifies a maximum alignment to truncate alignment specified in the aligned attribute of a static variable to this value.

Additional Inherited Members

Public Attributes inherited from clang::TransferrableTargetInfo
unsigned char PointerWidth
unsigned char PointerAlign
unsigned char BoolWidth
unsigned char BoolAlign
unsigned char ShortWidth
unsigned char ShortAlign
unsigned char IntWidth
unsigned char IntAlign
unsigned char HalfWidth
unsigned char HalfAlign
unsigned char BFloat16Width
unsigned char BFloat16Align
unsigned char FloatWidth
unsigned char FloatAlign
unsigned char DoubleWidth
unsigned char DoubleAlign
unsigned char LongDoubleWidth
unsigned char LongDoubleAlign
unsigned char Float128Align
unsigned char Ibm128Align
unsigned char LargeArrayMinWidth
unsigned char LargeArrayAlign
unsigned char LongWidth
unsigned char LongAlign
unsigned char LongLongWidth
unsigned char LongLongAlign
unsigned char Int128Align
std::optional< unsignedBitIntMaxAlign
unsigned char ShortAccumWidth
unsigned char ShortAccumAlign
unsigned char AccumWidth
unsigned char AccumAlign
unsigned char LongAccumWidth
unsigned char LongAccumAlign
unsigned char ShortFractWidth
unsigned char ShortFractAlign
unsigned char FractWidth
unsigned char FractAlign
unsigned char LongFractWidth
unsigned char LongFractAlign
bool PaddingOnUnsignedFixedPoint
unsigned char ShortAccumScale
unsigned char AccumScale
unsigned char LongAccumScale
unsigned char DefaultAlignForAttributeAligned
unsigned char MinGlobalAlign
unsigned short SuitableAlign
unsigned short NewAlign
unsigned MaxVectorAlign
unsigned MaxTLSAlign
const llvm::fltSemantics * HalfFormat
const llvm::fltSemantics * BFloat16Format
const llvm::fltSemantics * FloatFormat
const llvm::fltSemantics * DoubleFormat
const llvm::fltSemantics * LongDoubleFormat
const llvm::fltSemantics * Float128Format
const llvm::fltSemantics * Ibm128Format

Detailed Description

Exposes information about the current target.

Definition at line 225 of file TargetInfo.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

For ARM targets returns a mask defining which data sizes are suitable for __builtin_arm_ldrex and __builtin_arm_strex.

Enumerator
ARM_LDREX_B 
ARM_LDREX_H 

byte (8-bit)

ARM_LDREX_W 

half (16-bit)

ARM_LDREX_D 

word (32-bit)

Definition at line 1078 of file TargetInfo.h.

◆ ArmStreamingKind

Enumerator
NotStreaming 
StreamingCompatible 
Streaming 

Definition at line 1037 of file TargetInfo.h.

◆ BuiltinVaListKind

The different kinds of __builtin_va_list types defined by the target implementation.

Enumerator
CharPtrBuiltinVaList 

typedef char* __builtin_va_list;

VoidPtrBuiltinVaList 

typedef void* __builtin_va_list;

AArch64ABIBuiltinVaList 

__builtin_va_list as defined by the AArch64 ABI http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055a/IHI0055A_aapcs64.pdf

PowerABIBuiltinVaList 

__builtin_va_list as defined by the Power ABI: https://www.power.org /resources/downloads/Power-Arch-32-bit-ABI-supp-1.0-Embedded.pdf

X86_64ABIBuiltinVaList 

__builtin_va_list as defined by the x86-64 ABI: http://refspecs.linuxbase.org/elf/x86_64-abi-0.21.pdf

AAPCSABIBuiltinVaList 

__builtin_va_list as defined by ARM AAPCS ABI http://infocenter.arm.com

SystemZBuiltinVaList 
HexagonBuiltinVaList 
XtensaABIBuiltinVaList 

Definition at line 330 of file TargetInfo.h.

◆ CallingConvCheckResult

Enumerator
CCCR_OK 
CCCR_Warning 
CCCR_Ignore 
CCCR_Error 

Definition at line 1729 of file TargetInfo.h.

◆ CallingConvKind

Enumerator
CCK_Default 
CCK_ClangABI4OrPS4 
CCK_MicrosoftWin64 

Definition at line 1749 of file TargetInfo.h.

Constructor & Destructor Documentation

◆ TargetInfo()

TargetInfo::TargetInfo ( const llvm::Triple & T)
protected

Definition at line 58 of file TargetInfo.cpp.

References clang::TransferrableTargetInfo::AccumAlign, clang::TransferrableTargetInfo::AccumScale, clang::TransferrableTargetInfo::AccumWidth, AddrSpaceMap, AllowAMDGPUUnsafeFPAtomics, ARMCDECoprocMask, BigEndian, clang::TransferrableTargetInfo::BoolAlign, clang::TransferrableTargetInfo::BoolWidth, clang::TransferrableTargetInfo::Char16Type, clang::TransferrableTargetInfo::Char32Type, ComplexLongDoubleUsesFP2Ret, DefaultAddrSpaceMap, clang::TransferrableTargetInfo::DefaultAlignForAttributeAligned, clang::TransferrableTargetInfo::DoubleAlign, clang::TransferrableTargetInfo::DoubleFormat, clang::TransferrableTargetInfo::DoubleWidth, clang::TransferrableTargetInfo::Float128Align, clang::TransferrableTargetInfo::Float128Format, clang::TransferrableTargetInfo::FloatAlign, clang::TransferrableTargetInfo::FloatFormat, clang::TransferrableTargetInfo::FloatWidth, clang::TransferrableTargetInfo::FractAlign, clang::TransferrableTargetInfo::FractWidth, clang::TransferrableTargetInfo::HalfAlign, HalfArgsAndReturns, clang::TransferrableTargetInfo::HalfFormat, clang::TransferrableTargetInfo::HalfWidth, HasAArch64ACLETypes, HasAlignMac68kSupport, HasBFloat16, HasBuiltinMSVaList, HasFastHalfType, HasFloat128, HasFloat16, HasFPReturn, HasFullBFloat16, HasIbm128, HasLongDouble, HasMicrosoftRecordLayout, HasRISCVVTypes, HasStrictFP, HasUnalignedAccess, clang::TransferrableTargetInfo::Ibm128Align, clang::TransferrableTargetInfo::Ibm128Format, clang::if(), clang::TransferrableTargetInfo::Int128Align, clang::TransferrableTargetInfo::Int16Type, clang::TransferrableTargetInfo::Int64Type, clang::TransferrableTargetInfo::IntAlign, clang::TransferrableTargetInfo::IntMaxType, clang::TransferrableTargetInfo::IntPtrType, clang::TransferrableTargetInfo::IntWidth, clang::TransferrableTargetInfo::LargeArrayAlign, clang::TransferrableTargetInfo::LargeArrayMinWidth, clang::TransferrableTargetInfo::LargestOverSizedBitfieldContainer, clang::TransferrableTargetInfo::LongAccumAlign, clang::TransferrableTargetInfo::LongAccumScale, clang::TransferrableTargetInfo::LongAccumWidth, clang::TransferrableTargetInfo::LongAlign, clang::TransferrableTargetInfo::LongDoubleAlign, clang::TransferrableTargetInfo::LongDoubleFormat, clang::TransferrableTargetInfo::LongDoubleWidth, clang::TransferrableTargetInfo::LongFractAlign, clang::TransferrableTargetInfo::LongFractWidth, clang::TransferrableTargetInfo::LongLongAlign, clang::TransferrableTargetInfo::LongLongWidth, clang::TransferrableTargetInfo::LongWidth, clang::TransferrableTargetInfo::MaxAlignedAttribute, MaxAtomicInlineWidth, MaxAtomicPromoteWidth, MaxBitIntWidth, MaxOpenCLWorkGroupSize, clang::TransferrableTargetInfo::MaxTLSAlign, clang::TransferrableTargetInfo::MaxVectorAlign, MCountName, clang::TransferrableTargetInfo::MinGlobalAlign, clang::TransferrableTargetInfo::NewAlign, NoAsmVariants, clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint, PlatformMinVersion, PlatformName, clang::TransferrableTargetInfo::PointerAlign, clang::TransferrableTargetInfo::PointerWidth, clang::TransferrableTargetInfo::ProcessIDType, clang::TransferrableTargetInfo::PtrDiffType, RealTypeUsesObjCFPRetMask, RegParmMax, clang::TransferrableTargetInfo::ShortAccumAlign, clang::TransferrableTargetInfo::ShortAccumScale, clang::TransferrableTargetInfo::ShortAccumWidth, clang::TransferrableTargetInfo::ShortAlign, clang::TransferrableTargetInfo::ShortFractAlign, clang::TransferrableTargetInfo::ShortFractWidth, clang::TransferrableTargetInfo::ShortWidth, clang::TransferrableTargetInfo::SigAtomicType, clang::TransferrableTargetInfo::SignedInt, clang::TransferrableTargetInfo::SignedLong, clang::TransferrableTargetInfo::SignedLongLong, clang::TransferrableTargetInfo::SignedShort, clang::TransferrableTargetInfo::SizeType, SSERegParmMax, clang::TransferrableTargetInfo::SuitableAlign, clang::T, TheCXXABI, TLSSupported, clang::TransferrableTargetInfo::UnsignedInt, clang::TransferrableTargetInfo::UnsignedLong, clang::TransferrableTargetInfo::UnsignedShort, UseAddrSpaceMapMangling, clang::TransferrableTargetInfo::UseBitFieldTypeAlignment, clang::TransferrableTargetInfo::UseExplicitBitFieldAlignment, clang::TransferrableTargetInfo::UseLeadingZeroLengthBitfield, UserLabelPrefix, clang::TransferrableTargetInfo::UseSignedCharForObjCBool, clang::TransferrableTargetInfo::UseZeroLengthBitfieldAlignment, VLASupported, clang::TransferrableTargetInfo::WCharType, clang::TransferrableTargetInfo::WIntType, and clang::TransferrableTargetInfo::ZeroLengthBitfieldBoundary.

Referenced by clang::targets::AArch64TargetInfo::AArch64TargetInfo(), adjust(), clang::targets::AMDGPUTargetInfo::adjust(), clang::targets::BaseSPIRTargetInfo::adjust(), clang::targets::DirectXTargetInfo::adjust(), clang::targets::PPCTargetInfo::adjust(), clang::targets::SPIRV64AMDGCNTargetInfo::adjust(), clang::targets::SPIRV64TargetInfo::adjust(), clang::targets::X86_64TargetInfo::adjust(), clang::targets::X86TargetInfo::adjust(), clang::targets::AMDGPUTargetInfo::AMDGPUTargetInfo(), clang::targets::ARCTargetInfo::ARCTargetInfo(), clang::targets::ARMTargetInfo::ARMTargetInfo(), clang::targets::AVRTargetInfo::AVRTargetInfo(), clang::targets::BaseSPIRTargetInfo::BaseSPIRTargetInfo(), clang::targets::BPFTargetInfo::BPFTargetInfo(), copyAuxTarget(), CreateTargetInfo(), clang::targets::CSKYTargetInfo::CSKYTargetInfo(), clang::targets::DirectXTargetInfo::DirectXTargetInfo(), clang::targets::HexagonTargetInfo::HexagonTargetInfo(), clang::targets::LanaiTargetInfo::LanaiTargetInfo(), clang::targets::LoongArchTargetInfo::LoongArchTargetInfo(), clang::targets::M68kTargetInfo::M68kTargetInfo(), clang::targets::MipsTargetInfo::MipsTargetInfo(), clang::targets::MSP430TargetInfo::MSP430TargetInfo(), clang::targets::NVPTXTargetInfo::NVPTXTargetInfo(), clang::targets::PPCTargetInfo::PPCTargetInfo(), clang::targets::RISCVTargetInfo::RISCVTargetInfo(), setAuxTarget(), clang::targets::AMDGPUTargetInfo::setAuxTarget(), clang::targets::SPIRV64AMDGCNTargetInfo::setAuxTarget(), clang::targets::SparcTargetInfo::SparcTargetInfo(), clang::targets::SystemZTargetInfo::SystemZTargetInfo(), clang::targets::TCETargetInfo::TCETargetInfo(), clang::targets::VETargetInfo::VETargetInfo(), clang::targets::WebAssemblyTargetInfo::WebAssemblyTargetInfo(), clang::targets::X86TargetInfo::X86TargetInfo(), clang::targets::XCoreTargetInfo::XCoreTargetInfo(), and clang::targets::XtensaTargetInfo::XtensaTargetInfo().

◆ ~TargetInfo()

TargetInfo::~TargetInfo ( )
virtual

Definition at line 195 of file TargetInfo.cpp.

Member Function Documentation

◆ adjust()

void TargetInfo::adjust ( DiagnosticsEngine & Diags,
LangOptions & Opts,
const TargetInfo * Aux )
virtual

Set forced language options.

adjust - Set forced language options.

Apply changes to the target information with respect to certain language options which change the target configuration and adjust the language based on the target options where applicable.

Reimplemented in clang::targets::AMDGPUTargetInfo, clang::targets::BaseSPIRTargetInfo, clang::targets::DirectXTargetInfo, clang::targets::PPCTargetInfo, clang::targets::SPIRV64AMDGCNTargetInfo, clang::targets::SPIRV64TargetInfo, clang::targets::X86_64TargetInfo, and clang::targets::X86TargetInfo.

Definition at line 415 of file TargetInfo.cpp.

References AddrSpaceMap, clang::TransferrableTargetInfo::BoolAlign, clang::TransferrableTargetInfo::BoolWidth, checkArithmeticFenceSupported(), clang::TransferrableTargetInfo::DoubleAlign, clang::TransferrableTargetInfo::DoubleFormat, clang::TransferrableTargetInfo::DoubleWidth, FakeAddrSpaceMap, clang::TransferrableTargetInfo::FloatAlign, clang::TransferrableTargetInfo::FloatFormat, clang::TransferrableTargetInfo::FloatWidth, getCharWidth(), getCXXABI(), getMaxPointerWidth(), clang::LangOptions::getOpenCLCompatibleVersion(), getSupportedOpenCLOpts(), getTriple(), clang::TransferrableTargetInfo::HalfAlign, clang::TransferrableTargetInfo::HalfFormat, clang::TransferrableTargetInfo::HalfWidth, hasFeatureEnabled(), HasMicrosoftRecordLayout, clang::TransferrableTargetInfo::Int64Type, clang::TransferrableTargetInfo::IntAlign, clang::TransferrableTargetInfo::IntMaxType, clang::TransferrableTargetInfo::IntPtrType, clang::TransferrableTargetInfo::IntWidth, clang::TargetCXXABI::isMicrosoft(), clang::TransferrableTargetInfo::LongAlign, clang::TransferrableTargetInfo::LongDoubleAlign, clang::TransferrableTargetInfo::LongDoubleFormat, clang::TransferrableTargetInfo::LongDoubleWidth, clang::TransferrableTargetInfo::LongLongAlign, clang::TransferrableTargetInfo::LongLongWidth, clang::TransferrableTargetInfo::LongWidth, MaxBitIntWidth, clang::TransferrableTargetInfo::NewAlign, clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint, clang::TransferrableTargetInfo::PtrDiffType, clang::DiagnosticsEngine::Report(), clang::TransferrableTargetInfo::ShortAlign, clang::TransferrableTargetInfo::ShortWidth, clang::TransferrableTargetInfo::SignedChar, clang::TransferrableTargetInfo::SignedInt, clang::TransferrableTargetInfo::SignedLong, clang::TransferrableTargetInfo::SignedLongLong, clang::TransferrableTargetInfo::SignedShort, clang::TransferrableTargetInfo::SizeType, TargetInfo(), clang::TransferrableTargetInfo::UnsignedChar, clang::TransferrableTargetInfo::UnsignedInt, clang::TransferrableTargetInfo::UnsignedLong, clang::TransferrableTargetInfo::UnsignedShort, clang::TransferrableTargetInfo::UseBitFieldTypeAlignment, and clang::TransferrableTargetInfo::WCharType.

Referenced by clang::targets::AMDGPUTargetInfo::adjust(), clang::targets::BaseSPIRTargetInfo::adjust(), clang::targets::DirectXTargetInfo::adjust(), clang::targets::PPCTargetInfo::adjust(), clang::targets::SPIRV64AMDGCNTargetInfo::adjust(), clang::targets::SPIRV64TargetInfo::adjust(), clang::targets::X86_64TargetInfo::adjust(), clang::targets::X86TargetInfo::adjust(), clang::CompilerInstance::createPreprocessor(), and clang::CompilerInstance::createTarget().

◆ allowDebugInfoForExternalRef()

virtual bool clang::TargetInfo::allowDebugInfoForExternalRef ( ) const
inlinevirtual

Whether target allows debuginfo types for decl only variables/functions.

Reimplemented in clang::targets::BPFTargetInfo.

Definition at line 1875 of file TargetInfo.h.

◆ allowHalfArgsAndReturns()

virtual bool clang::TargetInfo::allowHalfArgsAndReturns ( ) const
inlinevirtual

Whether half args and returns are supported.

Definition at line 709 of file TargetInfo.h.

References HalfArgsAndReturns.

Referenced by GetFullTypeForDeclarator().

◆ allowsLargerPreferedTypeAlignment()

virtual bool clang::TargetInfo::allowsLargerPreferedTypeAlignment ( ) const
inlinevirtual

Whether target allows to overalign ABI-specified preferred alignment.

Reimplemented in clang::targets::AVRTargetInfo, clang::targets::CSKYTargetInfo, clang::targets::MCUX86_32TargetInfo, clang::targets::MSP430TargetInfo, clang::targets::VETargetInfo, and clang::targets::XCoreTargetInfo.

Definition at line 1795 of file TargetInfo.h.

◆ areDefaultedSMFStillPOD()

bool TargetInfo::areDefaultedSMFStillPOD ( const LangOptions & LangOpts) const
virtual

Controls whether explicitly defaulted (= default) special member functions disqualify something from being POD-for-the-purposes-of-layout.

Historically, Clang didn't consider these acceptable for POD, but GCC does. So in newer Clang ABIs they are acceptable for POD to be compatible with GCC/Itanium ABI, and remains disqualifying for targets that need Clang backwards compatibility rather than GCC/Itanium ABI compatibility.

Reimplemented in clang::targets::AIXTargetInfo< PPC32TargetInfo >, clang::targets::AIXTargetInfo< PPC64TargetInfo >, clang::targets::DarwinTargetInfo< AArch64leTargetInfo >, clang::targets::DarwinTargetInfo< ARMleTargetInfo >, clang::targets::DarwinTargetInfo< X86_32TargetInfo >, and clang::targets::DarwinTargetInfo< X86_64TargetInfo >.

Definition at line 637 of file TargetInfo.cpp.

◆ callGlobalDeleteInDeletingDtor()

bool TargetInfo::callGlobalDeleteInDeletingDtor ( const LangOptions & LangOpts) const
virtual

Controls whether global operator delete is called by the deleting destructor or at the point where ::delete was called.

Historically Clang called global operator delete outside of the deleting destructor for both Microsoft and Itanium ABI. In Clang 21 support for ::delete was aligned with Microsoft ABI, so it will call global operator delete in the deleting destructor body.

Definition at line 629 of file TargetInfo.cpp.

References getCXXABI().

◆ checkArithmeticFenceSupported()

virtual bool clang::TargetInfo::checkArithmeticFenceSupported ( ) const
inlinevirtual

Controls if __arithmetic_fence is supported in the targeted backend.

Reimplemented in clang::targets::AArch64TargetInfo, clang::targets::SPIRTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1712 of file TargetInfo.h.

Referenced by adjust(), and clang::CodeGen::CodeGenFunction::EmitBuiltinExpr().

◆ checkCallingConvention()

◆ checkCFBranchLabelSchemeSupported()

bool TargetInfo::checkCFBranchLabelSchemeSupported ( const CFBranchLabelSchemeKind Scheme,
DiagnosticsEngine & Diags ) const
virtual

◆ checkCFProtectionBranchSupported()

bool TargetInfo::checkCFProtectionBranchSupported ( DiagnosticsEngine & Diags) const
virtual

Check if the target supports CFProtection branch.

Reimplemented in clang::targets::RISCVTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 203 of file TargetInfo.cpp.

References clang::DiagnosticsEngine::Report().

Referenced by clang::targets::X86TargetInfo::checkCFProtectionBranchSupported().

◆ checkCFProtectionReturnSupported()

bool TargetInfo::checkCFProtectionReturnSupported ( DiagnosticsEngine & Diags) const
virtual

◆ convertConstraint()

◆ copyAuxTarget()

void TargetInfo::copyAuxTarget ( const TargetInfo * Aux)
protected

Copy type and layout related info.

Definition at line 1040 of file TargetInfo.cpp.

References clang::Target, and TargetInfo().

Referenced by clang::targets::AMDGPUTargetInfo::setAuxTarget(), and clang::targets::SPIRV64AMDGCNTargetInfo::setAuxTarget().

◆ CPUSpecificManglingCharacter()

virtual char clang::TargetInfo::CPUSpecificManglingCharacter ( StringRef Name) const
inlinevirtual

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1582 of file TargetInfo.h.

◆ CreateTargetInfo()

TargetInfo * TargetInfo::CreateTargetInfo ( DiagnosticsEngine & Diags,
TargetOptions & Opts )
static

Construct a target for the given options.

CreateTargetInfo - Return the target info object for the specified target options.

Parameters
Opts- The options to use to initialize the target. The target may modify the options to canonicalize the target feature information to match what the backend expects. These must outlive the returned TargetInfo.

Definition at line 779 of file Targets.cpp.

References clang::TargetOptions::ABI, clang::targets::AllocateTarget(), clang::TargetOptions::CPU, clang::TargetOptions::FeaturesAsWritten, clang::TargetOptions::FPMath, clang::DiagnosticsEngine::Report(), clang::Target, TargetInfo(), clang::TargetOptions::Triple, and clang::TargetOptions::TuneCPU.

Referenced by clang::createChainedIncludesSource(), and clang::CompilerInstance::createTarget().

◆ defaultsToAIXPowerAlignment()

virtual bool clang::TargetInfo::defaultsToAIXPowerAlignment ( ) const
inlinevirtual

Whether target defaults to the power alignment rules of AIX.

Reimplemented in clang::targets::AIXTargetInfo< PPC32TargetInfo >, and clang::targets::AIXTargetInfo< PPC64TargetInfo >.

Definition at line 1798 of file TargetInfo.h.

◆ doesFeatureAffectCodeGen()

virtual bool clang::TargetInfo::doesFeatureAffectCodeGen ( StringRef Feature) const
inlinevirtual

Returns true if feature has an impact on target code generation.

Reimplemented in clang::targets::AArch64TargetInfo.

Definition at line 1437 of file TargetInfo.h.

References Feature.

◆ doUnsignedFixedPointTypesHavePadding()

bool clang::TargetInfo::doUnsignedFixedPointTypesHavePadding ( ) const
inline

In the event this target uses the same number of fractional bits for its unsigned types as it does with its signed counterparts, there will be exactly one bit of padding.

Return true if unsigned fixed point types have padding for this target.

Definition at line 451 of file TargetInfo.h.

References clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint.

Referenced by DefineFixedPointMacros().

◆ fillValidCPUList()

◆ fillValidTuneCPUList()

virtual void clang::TargetInfo::fillValidTuneCPUList ( SmallVectorImpl< StringRef > & Values) const
inlinevirtual

Fill a SmallVectorImpl with the valid values for tuning CPU.

Reimplemented in clang::targets::RISCVTargetInfo, clang::targets::SystemZTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1380 of file TargetInfo.h.

References fillValidCPUList().

◆ getABI()

◆ getAccumAlign()

unsigned clang::TargetInfo::getAccumAlign ( ) const
inline

Definition at line 567 of file TargetInfo.h.

References clang::TransferrableTargetInfo::AccumAlign.

◆ getAccumIBits()

unsigned clang::TargetInfo::getAccumIBits ( ) const
inline

◆ getAccumScale()

unsigned clang::TargetInfo::getAccumScale ( ) const
inline

getAccumScale/IBits - Return the number of fractional/integral bits in a 'signed _Accum' type.

Definition at line 598 of file TargetInfo.h.

References clang::TransferrableTargetInfo::AccumScale.

Referenced by InitializePredefinedMacros().

◆ getAccumWidth()

unsigned clang::TargetInfo::getAccumWidth ( ) const
inline

getAccumWidth/Align - Return the size of 'signed _Accum' and 'unsigned _Accum' for this target, in bits.

Definition at line 566 of file TargetInfo.h.

References clang::TransferrableTargetInfo::AccumWidth.

Referenced by InitializePredefinedMacros().

◆ getAddressSpaceMap()

const LangASMap & clang::TargetInfo::getAddressSpaceMap ( ) const
inline

Definition at line 1659 of file TargetInfo.h.

References AddrSpaceMap.

Referenced by getTargetAddressSpace().

◆ getARMCDECoprocMask()

uint32_t clang::TargetInfo::getARMCDECoprocMask ( ) const
inline

For ARM targets returns a mask defining which coprocessors are configured as Custom Datapath.

Definition at line 1074 of file TargetInfo.h.

References ARMCDECoprocMask.

Referenced by clang::SemaARM::CheckARMCoprocessorImmediate(), and clang::targets::ARMTargetInfo::getTargetDefines().

◆ getARMLDREXMask()

virtual unsigned clang::TargetInfo::getARMLDREXMask ( ) const
inlinevirtual

Reimplemented in clang::targets::ARMTargetInfo.

Definition at line 1085 of file TargetInfo.h.

Referenced by clang::SemaARM::CheckARMBuiltinExclusiveCall().

◆ getAtomicOpts()

AtomicOptions clang::TargetInfo::getAtomicOpts ( ) const
inline

Get the default atomic options.

Definition at line 1727 of file TargetInfo.h.

References AtomicOpts.

◆ getBFloat16Align()

unsigned clang::TargetInfo::getBFloat16Align ( ) const
inline

Definition at line 792 of file TargetInfo.h.

References clang::TransferrableTargetInfo::BFloat16Align.

◆ getBFloat16Format()

const llvm::fltSemantics & clang::TargetInfo::getBFloat16Format ( ) const
inline

◆ getBFloat16Mangling()

virtual const char * clang::TargetInfo::getBFloat16Mangling ( ) const
inlinevirtual

Return the mangled code of bfloat.

Reimplemented in clang::targets::AArch64TargetInfo, and clang::targets::ARMTargetInfo.

Definition at line 834 of file TargetInfo.h.

◆ getBFloat16Width()

unsigned clang::TargetInfo::getBFloat16Width ( ) const
inline

getBFloat16Width/Align/Format - Return the size/align/format of '__bf16'.

Definition at line 791 of file TargetInfo.h.

References clang::TransferrableTargetInfo::BFloat16Width.

◆ getBitIntAlign()

unsigned clang::TargetInfo::getBitIntAlign ( unsigned NumBits) const
inline

Definition at line 554 of file TargetInfo.h.

References getBitIntMaxAlign(), and getCharWidth().

Referenced by getBitIntWidth().

◆ getBitIntMaxAlign()

unsigned clang::TargetInfo::getBitIntMaxAlign ( ) const
inline

getBitIntMaxAlign() - Returns the maximum possible alignment of '_BitInt' and 'unsigned _BitInt'.

Definition at line 545 of file TargetInfo.h.

References clang::TransferrableTargetInfo::BitIntMaxAlign, and clang::TransferrableTargetInfo::LongLongAlign.

Referenced by getBitIntAlign().

◆ getBitIntWidth()

unsigned clang::TargetInfo::getBitIntWidth ( unsigned NumBits) const
inline

getBitIntAlign/Width - Return aligned size of '_BitInt' and 'unsigned _BitInt' for this target, in bits.

Definition at line 551 of file TargetInfo.h.

References getBitIntAlign().

◆ getBoolAlign()

unsigned clang::TargetInfo::getBoolAlign ( ) const
inline

Return the alignment of '_Bool' and C++ 'bool' for this target.

Definition at line 515 of file TargetInfo.h.

References clang::TransferrableTargetInfo::BoolAlign.

◆ getBoolWidth()

unsigned clang::TargetInfo::getBoolWidth ( ) const
inline

Return the size of '_Bool' and C++ 'bool' for this target, in bits.

Definition at line 512 of file TargetInfo.h.

References clang::TransferrableTargetInfo::BoolWidth.

◆ getBuiltinVaListKind()

◆ getCallingConvKind()

TargetInfo::CallingConvKind TargetInfo::getCallingConvKind ( bool ClangABICompat4) const
virtual

◆ getChar16Align()

unsigned clang::TargetInfo::getChar16Align ( ) const
inline

Definition at line 773 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Char16Type, and getTypeAlign().

◆ getChar16Type()

IntType clang::TargetInfo::getChar16Type ( ) const
inline

Definition at line 417 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Char16Type.

Referenced by InitializePredefinedMacros().

◆ getChar16Width()

unsigned clang::TargetInfo::getChar16Width ( ) const
inline

getChar16Width/Align - Return the size of 'char16_t' for this target, in bits.

Definition at line 772 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Char16Type, and getTypeWidth().

Referenced by EvaluateValue().

◆ getChar32Align()

unsigned clang::TargetInfo::getChar32Align ( ) const
inline

Definition at line 778 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Char32Type, and getTypeAlign().

◆ getChar32Type()

IntType clang::TargetInfo::getChar32Type ( ) const
inline

Definition at line 418 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Char32Type.

Referenced by InitializePredefinedMacros().

◆ getChar32Width()

unsigned clang::TargetInfo::getChar32Width ( ) const
inline

getChar32Width/Align - Return the size of 'char32_t' for this target, in bits.

Definition at line 777 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Char32Type, and getTypeWidth().

Referenced by EvaluateValue().

◆ getCharAlign()

unsigned clang::TargetInfo::getCharAlign ( ) const
inline

◆ getCharWidth()

◆ getClobbers()

◆ getConstantAddressSpace()

virtual std::optional< LangAS > clang::TargetInfo::getConstantAddressSpace ( ) const
inlinevirtual

Return an AST address space which can be used opportunistically for constant global memory.

It must be possible to convert pointers into this address space to LangAS::Default. If no such address space exists, this may return std::nullopt, and such optimizations will be disabled.

Reimplemented in clang::targets::AMDGPUTargetInfo, and clang::targets::SPIRV64TargetInfo.

Definition at line 1687 of file TargetInfo.h.

References clang::Default.

◆ getConstraintRegister()

virtual StringRef clang::TargetInfo::getConstraintRegister ( StringRef Constraint,
StringRef Expression ) const
inlinevirtual

Extracts a register from the passed constraint (if it is a single-register constraint) and the asm label expression related to a variable in the input or output list of an inline asm statement.

This function is used by Sema in order to diagnose conflicts between the clobber list and the input/output lists.

Reimplemented in clang::targets::AArch64TargetInfo, clang::targets::ARMTargetInfo, clang::targets::RISCVTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1115 of file TargetInfo.h.

◆ getCorrespondingUnsignedType()

◆ getCPUCacheLineSize()

virtual std::optional< unsigned > clang::TargetInfo::getCPUCacheLineSize ( ) const
inlinevirtual

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1605 of file TargetInfo.h.

◆ getCPUSpecificCPUDispatchFeatures()

virtual void clang::TargetInfo::getCPUSpecificCPUDispatchFeatures ( StringRef Name,
llvm::SmallVectorImpl< StringRef > & Features ) const
inlinevirtual

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1597 of file TargetInfo.h.

◆ getCPUSpecificTuneName()

virtual StringRef clang::TargetInfo::getCPUSpecificTuneName ( StringRef Name) const
inlinevirtual

Definition at line 1589 of file TargetInfo.h.

◆ getCUDABuiltinAddressSpace()

virtual LangAS clang::TargetInfo::getCUDABuiltinAddressSpace ( unsigned AS) const
inlinevirtual

Map from the address space field in builtin description strings to the language address space.

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 1679 of file TargetInfo.h.

References clang::getLangASFromTargetAS().

Referenced by clang::ASTContext::getLangASForBuiltinAddressSpace().

◆ getCXXABI()

◆ getDarwinTargetVariantSDKVersion()

std::optional< VersionTuple > clang::TargetInfo::getDarwinTargetVariantSDKVersion ( ) const
inline

Returns the version of the darwin target variant SDK which was used during the compilation if one was specified, or an empty version otherwise.

Definition at line 1885 of file TargetInfo.h.

References getTargetOpts().

◆ getDarwinTargetVariantTriple()

const llvm::Triple * clang::TargetInfo::getDarwinTargetVariantTriple ( ) const
inline

Returns the darwin target variant triple, the variant of the deployment target for which the code is being compiled.

Definition at line 1879 of file TargetInfo.h.

References DarwinTargetVariantTriple.

Referenced by isTargetVariantEnvironment(), and isTargetVariantOS().

◆ getDataLayoutString()

const char * clang::TargetInfo::getDataLayoutString ( ) const
inline

Definition at line 1297 of file TargetInfo.h.

References DataLayoutString.

Referenced by clang::CodeGenAction::ExecuteAction().

◆ getDefaultAlignForAttributeAligned()

unsigned clang::TargetInfo::getDefaultAlignForAttributeAligned ( ) const
inline

Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified.

Definition at line 746 of file TargetInfo.h.

References clang::TransferrableTargetInfo::DefaultAlignForAttributeAligned.

Referenced by getExnObjectAlignment(), and clang::ASTContext::getTargetDefaultAlignForAttributeAligned().

◆ getDefaultCallingConv()

virtual CallingConv clang::TargetInfo::getDefaultCallingConv ( ) const
inlinevirtual

Gets the default calling convention for the given target.

This function does not take into account any user options to override the default calling convention. For that, see ASTContext::getDefaultCallingConvention().

Reimplemented in clang::targets::BaseSPIRTargetInfo, clang::targets::X86_64TargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1719 of file TargetInfo.h.

References clang::CC_C.

◆ getDefaultCFBranchLabelScheme()

CFBranchLabelSchemeKind TargetInfo::getDefaultCFBranchLabelScheme ( ) const
virtual

Get the target default CFBranchLabelScheme scheme.

Reimplemented in clang::targets::RISCVTargetInfo.

Definition at line 208 of file TargetInfo.cpp.

◆ getDoubleAlign()

unsigned clang::TargetInfo::getDoubleAlign ( ) const
inline

Definition at line 797 of file TargetInfo.h.

References clang::TransferrableTargetInfo::DoubleAlign.

◆ getDoubleFormat()

const llvm::fltSemantics & clang::TargetInfo::getDoubleFormat ( ) const
inline

◆ getDoubleWidth()

unsigned clang::TargetInfo::getDoubleWidth ( ) const
inline

getDoubleWidth/Align/Format - Return the size/align/format of 'double'.

Definition at line 796 of file TargetInfo.h.

References clang::TransferrableTargetInfo::DoubleWidth.

Referenced by getRealTypeByWidth(), and InitializePredefinedMacros().

◆ getDWARFAddressSpace()

virtual std::optional< unsigned > clang::TargetInfo::getDWARFAddressSpace ( unsigned AddressSpace) const
inlinevirtual
Returns
If a target requires an address within a target specific address space AddressSpace to be converted in order to be used, then return the corresponding target specific DWARF address space.
Otherwise return std::nullopt and no conversion will be emitted in the DWARF.

Reimplemented in clang::targets::AMDGPUTargetInfo, clang::targets::BaseSPIRTargetInfo, and clang::targets::NVPTXTargetInfo.

Definition at line 1849 of file TargetInfo.h.

◆ getEHDataRegisterNumber()

virtual int clang::TargetInfo::getEHDataRegisterNumber ( unsigned RegNo) const
inlinevirtual

◆ getExnObjectAlignment()

virtual unsigned clang::TargetInfo::getExnObjectAlignment ( ) const
inlinevirtual

Return the alignment (in bits) of the thrown exception object.

This is only meaningful for targets that allocate C++ exceptions in a system runtime, such as those using the Itanium C++ ABI.

Reimplemented in clang::targets::DarwinTargetInfo< AArch64leTargetInfo >, clang::targets::DarwinTargetInfo< ARMleTargetInfo >, clang::targets::DarwinTargetInfo< X86_32TargetInfo >, and clang::targets::DarwinTargetInfo< X86_64TargetInfo >.

Definition at line 875 of file TargetInfo.h.

References getDefaultAlignForAttributeAligned().

◆ getFloat128Align()

unsigned clang::TargetInfo::getFloat128Align ( ) const
inline

Definition at line 811 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Float128Align.

◆ getFloat128Format()

const llvm::fltSemantics & clang::TargetInfo::getFloat128Format ( ) const
inline

◆ getFloat128Mangling()

virtual const char * clang::TargetInfo::getFloat128Mangling ( ) const
inlinevirtual

Return the mangled code of __float128.

Reimplemented in clang::targets::PPCTargetInfo.

Definition at line 826 of file TargetInfo.h.

◆ getFloat128Width()

unsigned clang::TargetInfo::getFloat128Width ( ) const
inline

getFloat128Width/Align/Format - Return the size/align/format of '__float128'.

Definition at line 810 of file TargetInfo.h.

◆ getFloatAlign()

unsigned clang::TargetInfo::getFloatAlign ( ) const
inline

Definition at line 787 of file TargetInfo.h.

References clang::TransferrableTargetInfo::FloatAlign.

◆ getFloatFormat()

const llvm::fltSemantics & clang::TargetInfo::getFloatFormat ( ) const
inline

◆ getFloatWidth()

unsigned clang::TargetInfo::getFloatWidth ( ) const
inline

getFloatWidth/Align/Format - Return the size/align/format of 'float'.

Definition at line 786 of file TargetInfo.h.

References clang::TransferrableTargetInfo::FloatWidth.

Referenced by getRealTypeByWidth(), and InitializePredefinedMacros().

◆ getFMVPriority()

virtual llvm::APInt clang::TargetInfo::getFMVPriority ( ArrayRef< StringRef > Features) const
inlinevirtual

◆ getFPEvalMethod()

virtual LangOptions::FPEvalMethodKind clang::TargetInfo::getFPEvalMethod ( ) const
inlinevirtual

Return the value for the C99 FLT_EVAL_METHOD macro.

Reimplemented in clang::targets::AIXTargetInfo< PPC32TargetInfo >, clang::targets::AIXTargetInfo< PPC64TargetInfo >, and clang::targets::X86TargetInfo.

Definition at line 837 of file TargetInfo.h.

References clang::LangOptionsBase::FEM_Source.

◆ getFractAlign()

unsigned clang::TargetInfo::getFractAlign ( ) const
inline

Definition at line 582 of file TargetInfo.h.

References clang::TransferrableTargetInfo::FractAlign.

◆ getFractScale()

unsigned clang::TargetInfo::getFractScale ( ) const
inline

getFractScale - Return the number of fractional bits in a 'signed _Fract' type.

Definition at line 646 of file TargetInfo.h.

References clang::TransferrableTargetInfo::FractWidth.

Referenced by getUnsignedFractScale(), and InitializePredefinedMacros().

◆ getFractWidth()

unsigned clang::TargetInfo::getFractWidth ( ) const
inline

getFractWidth/Align - Return the size of 'signed _Fract' and 'unsigned _Fract' for this target, in bits.

Definition at line 581 of file TargetInfo.h.

References clang::TransferrableTargetInfo::FractWidth.

Referenced by InitializePredefinedMacros().

◆ getGCCAddlRegNames()

virtual ArrayRef< AddlRegName > clang::TargetInfo::getGCCAddlRegNames ( ) const
inlineprotectedvirtual

◆ getGCCRegAliases()

◆ getGCCRegNames()

◆ getGridValue()

virtual const llvm::omp::GV & clang::TargetInfo::getGridValue ( ) const
inlinevirtual

◆ getHalfAlign()

unsigned clang::TargetInfo::getHalfAlign ( ) const
inline

Definition at line 782 of file TargetInfo.h.

References clang::TransferrableTargetInfo::HalfAlign.

◆ getHalfFormat()

const llvm::fltSemantics & clang::TargetInfo::getHalfFormat ( ) const
inline

◆ getHalfWidth()

unsigned clang::TargetInfo::getHalfWidth ( ) const
inline

getHalfWidth/Align/Format - Return the size/align/format of 'half'.

Definition at line 781 of file TargetInfo.h.

References clang::TransferrableTargetInfo::HalfWidth.

Referenced by getRealTypeByWidth().

◆ getIbm128Align()

unsigned clang::TargetInfo::getIbm128Align ( ) const
inline

Definition at line 819 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Ibm128Align.

◆ getIbm128Format()

const llvm::fltSemantics & clang::TargetInfo::getIbm128Format ( ) const
inline

Definition at line 820 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Ibm128Format.

◆ getIbm128Mangling()

virtual const char * clang::TargetInfo::getIbm128Mangling ( ) const
inlinevirtual

Return the mangled code of __ibm128.

Reimplemented in clang::targets::PPCTargetInfo.

Definition at line 829 of file TargetInfo.h.

◆ getIbm128Width()

unsigned clang::TargetInfo::getIbm128Width ( ) const
inline

getIbm128Width/Align/Format - Return the size/align/format of '__ibm128'.

Definition at line 818 of file TargetInfo.h.

◆ getInt128Align()

unsigned clang::TargetInfo::getInt128Align ( ) const
inline

getInt128Align() - Returns the alignment of Int128.

Definition at line 541 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Int128Align.

◆ getInt16Type()

IntType clang::TargetInfo::getInt16Type ( ) const
inline

Definition at line 423 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Int16Type.

Referenced by DefineExactWidthIntType().

◆ getInt64Type()

IntType clang::TargetInfo::getInt64Type ( ) const
inline

◆ getIntAlign()

unsigned clang::TargetInfo::getIntAlign ( ) const
inline

Definition at line 528 of file TargetInfo.h.

References clang::TransferrableTargetInfo::IntAlign.

Referenced by getTypeAlign().

◆ getIntMaxTWidth()

unsigned clang::TargetInfo::getIntMaxTWidth ( ) const
inline

Return the size of intmax_t and uintmax_t for this target, in bits.

Definition at line 888 of file TargetInfo.h.

References getTypeWidth(), and clang::TransferrableTargetInfo::IntMaxType.

◆ getIntMaxType()

IntType clang::TargetInfo::getIntMaxType ( ) const
inline

Definition at line 400 of file TargetInfo.h.

References clang::TransferrableTargetInfo::IntMaxType.

Referenced by InitializePredefinedMacros().

◆ getIntPtrType()

IntType clang::TargetInfo::getIntPtrType ( ) const
inline

◆ getIntTypeByWidth()

◆ getIntWidth()

unsigned clang::TargetInfo::getIntWidth ( ) const
inline

◆ getLargeArrayAlign()

unsigned clang::TargetInfo::getLargeArrayAlign ( ) const
inline

Definition at line 846 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LargeArrayAlign.

◆ getLargeArrayMinWidth()

unsigned clang::TargetInfo::getLargeArrayMinWidth ( ) const
inline

Definition at line 845 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LargeArrayMinWidth.

◆ getLargestOverSizedBitfieldContainer()

unsigned clang::TargetInfo::getLargestOverSizedBitfieldContainer ( ) const
inline

◆ getLeastIntTypeByWidth()

◆ getLongAccumAlign()

unsigned clang::TargetInfo::getLongAccumAlign ( ) const
inline

Definition at line 572 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongAccumAlign.

◆ getLongAccumIBits()

unsigned clang::TargetInfo::getLongAccumIBits ( ) const
inline

◆ getLongAccumScale()

unsigned clang::TargetInfo::getLongAccumScale ( ) const
inline

getLongAccumScale/IBits - Return the number of fractional/integral bits in a 'signed long _Accum' type.

Definition at line 603 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongAccumScale.

Referenced by InitializePredefinedMacros().

◆ getLongAccumWidth()

unsigned clang::TargetInfo::getLongAccumWidth ( ) const
inline

getLongAccumWidth/Align - Return the size of 'signed long _Accum' and 'unsigned long _Accum' for this target, in bits.

Definition at line 571 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongAccumWidth.

Referenced by InitializePredefinedMacros().

◆ getLongAlign()

unsigned clang::TargetInfo::getLongAlign ( ) const
inline

Definition at line 533 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongAlign.

Referenced by getTypeAlign().

◆ getLongDoubleAlign()

unsigned clang::TargetInfo::getLongDoubleAlign ( ) const
inline

Definition at line 803 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongDoubleAlign.

◆ getLongDoubleFormat()

◆ getLongDoubleMangling()

virtual const char * clang::TargetInfo::getLongDoubleMangling ( ) const
inlinevirtual

Return the mangled code of long double.

Reimplemented in clang::targets::PPCTargetInfo, clang::targets::SystemZTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 823 of file TargetInfo.h.

◆ getLongDoubleWidth()

unsigned clang::TargetInfo::getLongDoubleWidth ( ) const
inline

getLongDoubleWidth/Align/Format - Return the size/align/format of 'long double'.

Definition at line 802 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongDoubleWidth.

Referenced by InitializePredefinedMacros().

◆ getLongFractAlign()

unsigned clang::TargetInfo::getLongFractAlign ( ) const
inline

Definition at line 587 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongFractAlign.

◆ getLongFractScale()

unsigned clang::TargetInfo::getLongFractScale ( ) const
inline

getLongFractScale - Return the number of fractional bits in a 'signed long _Fract' type.

Definition at line 650 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongFractWidth.

Referenced by getUnsignedLongFractScale(), and InitializePredefinedMacros().

◆ getLongFractWidth()

unsigned clang::TargetInfo::getLongFractWidth ( ) const
inline

getLongFractWidth/Align - Return the size of 'signed long _Fract' and 'unsigned long _Fract' for this target, in bits.

Definition at line 586 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongFractWidth.

Referenced by InitializePredefinedMacros().

◆ getLongLongAlign()

unsigned clang::TargetInfo::getLongLongAlign ( ) const
inline

Definition at line 538 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongLongAlign.

Referenced by getTypeAlign().

◆ getLongLongWidth()

unsigned clang::TargetInfo::getLongLongWidth ( ) const
inline

getLongLongWidth/Align - Return the size of 'signed long long' and 'unsigned long long' for this target, in bits.

Definition at line 537 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongLongWidth.

Referenced by getIntTypeByWidth(), getLeastIntTypeByWidth(), getTypeWidth(), and InitializePredefinedMacros().

◆ getLongWidth()

unsigned clang::TargetInfo::getLongWidth ( ) const
inline

getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' for this target, in bits.

Definition at line 532 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongWidth.

Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), getIntTypeByWidth(), getLeastIntTypeByWidth(), clang::targets::MipsTargetInfo::getTargetDefines(), getTypeWidth(), and InitializePredefinedMacros().

◆ getMaxAlignedAttribute()

unsigned clang::TargetInfo::getMaxAlignedAttribute ( ) const
inline

Get the maximum alignment in bits for a static variable with aligned attribute.

Definition at line 970 of file TargetInfo.h.

References clang::TransferrableTargetInfo::MaxAlignedAttribute.

Referenced by clang::ASTContext::getDeclAlign().

◆ getMaxAtomicInlineWidth()

unsigned clang::TargetInfo::getMaxAtomicInlineWidth ( ) const
inline

Return the maximum width lock-free atomic operation which can be inlined given the supported features of the given target.

Definition at line 853 of file TargetInfo.h.

References MaxAtomicInlineWidth.

Referenced by clang::ASTContext::AtomicUsesUnsupportedLibcall(), hasBuiltinAtomic(), clang::interp::interp__builtin_atomic_lock_free(), and clang::interp::interp__builtin_c11_atomic_is_lock_free().

◆ getMaxAtomicPromoteWidth()

unsigned clang::TargetInfo::getMaxAtomicPromoteWidth ( ) const
inline

Return the maximum width lock-free atomic operation which will ever be supported for the given target.

Definition at line 850 of file TargetInfo.h.

References MaxAtomicPromoteWidth.

◆ getMaxBitIntWidth()

virtual size_t clang::TargetInfo::getMaxBitIntWidth ( ) const
inlinevirtual

◆ getMaxOpenCLWorkGroupSize()

unsigned clang::TargetInfo::getMaxOpenCLWorkGroupSize ( ) const
inline

Definition at line 870 of file TargetInfo.h.

References MaxOpenCLWorkGroupSize.

◆ getMaxPointerWidth()

virtual uint64_t clang::TargetInfo::getMaxPointerWidth ( ) const
inlinevirtual

Return the maximum width of pointers on this target.

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 496 of file TargetInfo.h.

References clang::TransferrableTargetInfo::PointerWidth.

Referenced by adjust(), and clang::CodeGen::initializationPatternFor().

◆ getMaxTLSAlign()

unsigned clang::TargetInfo::getMaxTLSAlign ( ) const
inline

Return the maximum alignment (in bits) of a TLS variable.

Gets the maximum alignment (in bits) of a TLS variable on this target. Returns zero if there is no such constraint.

Definition at line 1624 of file TargetInfo.h.

References clang::TransferrableTargetInfo::MaxTLSAlign.

◆ getMaxVectorAlign()

unsigned clang::TargetInfo::getMaxVectorAlign ( ) const
inline

Return the maximum vector alignment supported for the given target.

Definition at line 868 of file TargetInfo.h.

References clang::TransferrableTargetInfo::MaxVectorAlign.

◆ getMCountName()

const char * clang::TargetInfo::getMCountName ( ) const
inline

Returns the name of the mcount instrumentation function.

Definition at line 924 of file TargetInfo.h.

References MCountName.

◆ getMinGlobalAlign()

virtual unsigned clang::TargetInfo::getMinGlobalAlign ( uint64_t Size,
bool HasNonWeakDef ) const
inlinevirtual

getMinGlobalAlign - Return the minimum alignment of a global variable, unless its alignment is explicitly reduced via attributes.

If

Parameters
HasNonWeakDefis true, this concerns a VarDecl which has a definition in current translation unit and that is not weak.

Reimplemented in clang::targets::CSKYTargetInfo, clang::targets::MicrosoftARM64TargetInfo, and clang::targets::SystemZTargetInfo.

Definition at line 754 of file TargetInfo.h.

References clang::TransferrableTargetInfo::MinGlobalAlign.

Referenced by clang::targets::MicrosoftARM64TargetInfo::getMinGlobalAlign(), and clang::ASTContext::getMinGlobalAlignOfVar().

◆ getNewAlign()

unsigned clang::TargetInfo::getNewAlign ( ) const
inline

Return the largest alignment for which a suitably-sized allocation with '::operator new(size_t)' is guaranteed to produce a correctly-aligned pointer.

Definition at line 761 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongDoubleAlign, clang::TransferrableTargetInfo::LongLongAlign, and clang::TransferrableTargetInfo::NewAlign.

Referenced by clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), hasNewExtendedAlignment(), and InitializeStandardPredefinedMacros().

◆ getNormalizedGCCRegisterName()

StringRef TargetInfo::getNormalizedGCCRegisterName ( StringRef Name,
bool ReturnCanonical = false ) const

Returns the "normalized" GCC register name.

ReturnCannonical true will return the register name without any additions such as "{}" or "%" in it's canonical form, for example: ReturnCanonical = true and Name = "rax", will return "ax".

Definition at line 721 of file TargetInfo.cpp.

References getGCCAddlRegNames(), getGCCRegAliases(), getGCCRegNames(), clang::isDigit(), isValidGCCRegisterName(), and removeGCCRegisterPrefix().

Referenced by collectClobbers(), and clang::CodeGen::CodeGenFunction::EmitAsmStmt().

◆ getNullPointerValue()

virtual uint64_t clang::TargetInfo::getNullPointerValue ( LangAS AddrSpace) const
inlinevirtual

Get integer value for null pointer.

Parameters
AddrSpaceaddress space of pointee in source language.

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 502 of file TargetInfo.h.

Referenced by clang::ASTContext::getTargetNullPointerValue().

◆ getOpenCLBuiltinAddressSpace()

virtual LangAS clang::TargetInfo::getOpenCLBuiltinAddressSpace ( unsigned AS) const
inlinevirtual

Map from the address space field in builtin description strings to the language address space.

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 1673 of file TargetInfo.h.

References clang::getLangASFromTargetAS().

Referenced by clang::ASTContext::getLangASForBuiltinAddressSpace().

◆ getOpenCLTypeAddrSpace()

LangAS TargetInfo::getOpenCLTypeAddrSpace ( OpenCLTypeKind TK) const
virtual

◆ getPlatformMinVersion()

VersionTuple clang::TargetInfo::getPlatformMinVersion ( ) const
inline

Retrieve the minimum desired version of the platform, to which the program should be compiled.

Definition at line 1703 of file TargetInfo.h.

References PlatformMinVersion.

Referenced by checkObjCMethodX86VectorTypes(), and DoEmitAvailabilityWarning().

◆ getPlatformName()

StringRef clang::TargetInfo::getPlatformName ( ) const
inline

Retrieve the name of the platform as it is used in the availability attribute.

Definition at line 1699 of file TargetInfo.h.

References PlatformName.

Referenced by clang::AvailabilityInfo::createFromDecl(), DiagnoseObjCImplementedDeprecations(), and DoEmitAvailabilityWarning().

◆ getPointerAlign()

uint64_t clang::TargetInfo::getPointerAlign ( LangAS AddrSpace) const
inline

◆ getPointerAlignV()

virtual uint64_t clang::TargetInfo::getPointerAlignV ( LangAS AddrSpace) const
inlineprotectedvirtual

◆ getPointerWidth()

◆ getPointerWidthV()

virtual uint64_t clang::TargetInfo::getPointerWidthV ( LangAS AddrSpace) const
inlineprotectedvirtual

◆ getProcessIDType()

IntType clang::TargetInfo::getProcessIDType ( ) const
inline

Definition at line 428 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ProcessIDType.

◆ getPtrDiffType()

IntType clang::TargetInfo::getPtrDiffType ( LangAS AddrSpace) const
inline

◆ getPtrDiffTypeV()

virtual enum IntType clang::TargetInfo::getPtrDiffTypeV ( LangAS AddrSpace) const
inlineprotectedvirtual

Definition at line 1912 of file TargetInfo.h.

References clang::TransferrableTargetInfo::PtrDiffType.

Referenced by getPtrDiffType().

◆ getRealTypeByWidth()

FloatModeKind TargetInfo::getRealTypeByWidth ( unsigned BitWidth,
FloatModeKind ExplicitType ) const

Return floating point type with specified width.

On PPC, there are three possible types for 128-bit floating point: "PPC double-double", IEEE 754R quad precision, and "long double" (which under the covers is represented as one of those two). At this time, there is no support for an explicit "PPC double-double" type (i.e. __ibm128) so we only need to differentiate between "long double" and IEEE quad precision.

Definition at line 339 of file TargetInfo.cpp.

References clang::Double, clang::Float, clang::Float128, getDoubleWidth(), getFloatWidth(), getHalfWidth(), getLongDoubleFormat(), clang::Half, hasFloat128Type(), hasIbm128Type(), clang::Ibm128, clang::LongDouble, and clang::NoFloat.

Referenced by clang::ASTContext::getRealTypeForBitwidth().

◆ getRegisterWidth()

virtual unsigned clang::TargetInfo::getRegisterWidth ( ) const
inlinevirtual

Return the "preferred" register width on this target.

Reimplemented in clang::targets::X86_64TargetInfo.

Definition at line 898 of file TargetInfo.h.

References clang::TransferrableTargetInfo::PointerWidth.

Referenced by clang::targets::LoongArchTargetInfo::getTargetDefines(), and parseModeAttrArg().

◆ getRegParmMax()

unsigned clang::TargetInfo::getRegParmMax ( ) const
inline

Definition at line 1610 of file TargetInfo.h.

References RegParmMax.

◆ getSDKVersion()

const llvm::VersionTuple & clang::TargetInfo::getSDKVersion ( ) const
inline
Returns
The version of the SDK which was used during the compilation if one was specified, or an empty version otherwise.

Definition at line 1856 of file TargetInfo.h.

References getTargetOpts().

Referenced by handleAliasAttr().

◆ getShortAccumAlign()

unsigned clang::TargetInfo::getShortAccumAlign ( ) const
inline

Definition at line 562 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortAccumAlign.

◆ getShortAccumIBits()

unsigned clang::TargetInfo::getShortAccumIBits ( ) const
inline

◆ getShortAccumScale()

unsigned clang::TargetInfo::getShortAccumScale ( ) const
inline

getShortAccumScale/IBits - Return the number of fractional/integral bits in a 'signed short _Accum' type.

Definition at line 591 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortAccumScale.

Referenced by InitializePredefinedMacros().

◆ getShortAccumWidth()

unsigned clang::TargetInfo::getShortAccumWidth ( ) const
inline

getShortAccumWidth/Align - Return the size of 'signed short _Accum' and 'unsigned short _Accum' for this target, in bits.

Definition at line 561 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortAccumWidth.

Referenced by InitializePredefinedMacros().

◆ getShortAlign()

unsigned clang::TargetInfo::getShortAlign ( ) const
inline

Definition at line 523 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortAlign.

Referenced by getTypeAlign().

◆ getShortFractAlign()

unsigned clang::TargetInfo::getShortFractAlign ( ) const
inline

Definition at line 577 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortFractAlign.

◆ getShortFractScale()

unsigned clang::TargetInfo::getShortFractScale ( ) const
inline

getShortFractScale - Return the number of fractional bits in a 'signed short _Fract' type.

Definition at line 642 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortFractWidth.

Referenced by getUnsignedShortFractScale(), and InitializePredefinedMacros().

◆ getShortFractWidth()

unsigned clang::TargetInfo::getShortFractWidth ( ) const
inline

getShortFractWidth/Align - Return the size of 'signed short _Fract' and 'unsigned short _Fract' for this target, in bits.

Definition at line 576 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortFractWidth.

Referenced by InitializePredefinedMacros().

◆ getShortWidth()

unsigned clang::TargetInfo::getShortWidth ( ) const
inline

getShortWidth/Align - Return the size of 'signed short' and 'unsigned short' for this target, in bits.

Definition at line 522 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortWidth.

Referenced by getIntTypeByWidth(), getLeastIntTypeByWidth(), getTypeConstantSuffix(), getTypeWidth(), and InitializePredefinedMacros().

◆ getSigAtomicType()

IntType clang::TargetInfo::getSigAtomicType ( ) const
inline

Definition at line 427 of file TargetInfo.h.

References clang::TransferrableTargetInfo::SigAtomicType.

Referenced by InitializePredefinedMacros().

◆ getSignedSizeType()

◆ getSizeType()

IntType clang::TargetInfo::getSizeType ( ) const
inline

◆ getStaticInitSectionSpecifier()

◆ getSuitableAlign()

unsigned clang::TargetInfo::getSuitableAlign ( ) const
inline

Return the alignment that is the largest alignment ever used for any scalar/SIMD data type on the target machine you are compiling for (including types with an extended alignment requirement).

Definition at line 742 of file TargetInfo.h.

References clang::TransferrableTargetInfo::SuitableAlign.

Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), and InitializePredefinedMacros().

◆ getSupportedOpenCLOpts() [1/2]

◆ getSupportedOpenCLOpts() [2/2]

const llvm::StringMap< bool > & clang::TargetInfo::getSupportedOpenCLOpts ( ) const
inline

Get const supported OpenCL extensions and optional core features.

Definition at line 1831 of file TargetInfo.h.

References getTargetOpts().

◆ getTargetAddressSpace()

◆ getTargetBuiltins()

◆ getTargetDefines()

virtual void clang::TargetInfo::getTargetDefines ( const LangOptions & Opts,
MacroBuilder & Builder ) const
pure virtual

===-— Other target property query methods -----------------------—===//

Appends the target-specific #define values for this target set to the specified buffer.

Implemented in clang::targets::AArch64beTargetInfo, clang::targets::AArch64leTargetInfo, clang::targets::AArch64TargetInfo, clang::targets::AMDGPUTargetInfo, clang::targets::ARCTargetInfo, clang::targets::ARMbeTargetInfo, clang::targets::ARMleTargetInfo, clang::targets::ARMTargetInfo, clang::targets::AVRTargetInfo, clang::targets::BaseSPIRVTargetInfo, clang::targets::BPFTargetInfo, clang::targets::CSKYTargetInfo, clang::targets::CygwinARMTargetInfo, clang::targets::CygwinX86_32TargetInfo, clang::targets::CygwinX86_64TargetInfo, clang::targets::DirectXTargetInfo, clang::targets::HaikuX86_32TargetInfo, clang::targets::HexagonTargetInfo, clang::targets::ItaniumWindowsARMleTargetInfo, clang::targets::LanaiTargetInfo, clang::targets::LoongArchTargetInfo, clang::targets::M68kTargetInfo, clang::targets::MCUX86_32TargetInfo, clang::targets::MicrosoftARM64TargetInfo, clang::targets::MicrosoftARMleTargetInfo, clang::targets::MicrosoftMipsTargetInfo, clang::targets::MicrosoftX86_32TargetInfo, clang::targets::MicrosoftX86_64TargetInfo, clang::targets::MinGWARMTargetInfo, clang::targets::MinGWMipsTargetInfo, clang::targets::MinGWX86_32TargetInfo, clang::targets::MipsTargetInfo, clang::targets::MSP430TargetInfo, clang::targets::NVPTXTargetInfo, clang::targets::OSTargetInfo< AArch64leTargetInfo >, clang::targets::OSTargetInfo< ARMleTargetInfo >, clang::targets::OSTargetInfo< MipsTargetInfo >, clang::targets::OSTargetInfo< PPC32TargetInfo >, clang::targets::OSTargetInfo< PPC64TargetInfo >, clang::targets::OSTargetInfo< X86_32TargetInfo >, clang::targets::OSTargetInfo< X86_64TargetInfo >, clang::targets::PPCTargetInfo, clang::targets::RISCVTargetInfo, clang::targets::RTEMSX86_32TargetInfo, clang::targets::SparcTargetInfo, clang::targets::SparcV8TargetInfo, clang::targets::SparcV9TargetInfo, clang::targets::SPIR32TargetInfo, clang::targets::SPIR64TargetInfo, clang::targets::SPIRTargetInfo, clang::targets::SPIRV32TargetInfo, clang::targets::SPIRV64AMDGCNTargetInfo, clang::targets::SPIRV64TargetInfo, clang::targets::SPIRVTargetInfo, clang::targets::SystemZTargetInfo, clang::targets::TCELETargetInfo, clang::targets::TCETargetInfo, clang::targets::VETargetInfo, clang::targets::WebAssembly32TargetInfo, clang::targets::WebAssembly64TargetInfo, clang::targets::WebAssemblyTargetInfo, clang::targets::X86TargetInfo, clang::targets::XCoreTargetInfo, and clang::targets::XtensaTargetInfo.

Referenced by clang::targets::CygwinX86_32TargetInfo::getTargetDefines(), clang::targets::CygwinX86_64TargetInfo::getTargetDefines(), clang::targets::ItaniumWindowsARMleTargetInfo::getTargetDefines(), clang::targets::MCUX86_32TargetInfo::getTargetDefines(), clang::targets::MicrosoftARM64TargetInfo::getTargetDefines(), clang::targets::MicrosoftARMleTargetInfo::getTargetDefines(), clang::targets::MicrosoftMipsTargetInfo::getTargetDefines(), clang::targets::MicrosoftX86_32TargetInfo::getTargetDefines(), clang::targets::MicrosoftX86_64TargetInfo::getTargetDefines(), clang::targets::MinGWARMTargetInfo::getTargetDefines(), clang::targets::MinGWMipsTargetInfo::getTargetDefines(), clang::targets::MinGWX86_32TargetInfo::getTargetDefines(), clang::targets::RTEMSX86_32TargetInfo::getTargetDefines(), and InitializePredefinedMacros().

◆ getTargetID()

virtual std::optional< std::string > clang::TargetInfo::getTargetID ( ) const
inlinevirtual

Returns the target ID if supported.

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 1293 of file TargetInfo.h.

◆ getTargetOpts()

◆ getTriple()

const llvm::Triple & clang::TargetInfo::getTriple ( ) const
inline

Returns the target triple of the primary target.

Definition at line 1288 of file TargetInfo.h.

Referenced by clang::targets::AArch64TargetInfo::AArch64TargetInfo(), clang::SemaHLSL::ActOnTopLevelFunction(), addLinkOptionsPostorder(), adjust(), clang::targets::AMDGPUTargetInfo::adjust(), clang::targets::BaseSPIRTargetInfo::adjust(), clang::targets::PPCTargetInfo::adjust(), clang::targets::AMDGPUTargetInfo::AMDGPUTargetInfo(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), clang::ASTContext::AtomicUsesUnsupportedLibcall(), buildGlobalBlock(), BuiltinCpu(), canPassInRegisters(), captureInLambda(), clang::SemaARM::CheckARMBuiltinExclusiveCall(), clang::SemaX86::CheckBuiltinFunctionCall(), CheckBuiltinTargetInSupported(), CheckBuiltinTargetNotInUnsupported(), clang::Sema::CheckCallingConvAttr(), clang::targets::WindowsARM64TargetInfo::checkCallingConvention(), clang::SemaHLSL::CheckEntryPoint(), CheckMultiVersionFunction(), CheckMultiVersionValue(), clang::SemaARM::CheckNeonBuiltinFunctionCall(), checkObjCMethodX86VectorTypes(), clang::SemaSPIRV::CheckSPIRVBuiltinFunctionCall(), clang::Sema::checkTypeSupport(), checkVAStartABI(), clang::CodeGen::computeSPIRKernelABIInfo(), configureBlocksRuntimeObject(), clang::Interpreter::create(), clang::ExtractAPIAction::CreateASTConsumer(), clang::WrappingExtractAPIAction::CreateASTConsumer(), clang::CompilerInstance::createTarget(), clang::targets::DarwinAArch64TargetInfo::DarwinAArch64TargetInfo(), clang::Sema::diagnoseUnavailableAlignedAllocation(), DoEmitAvailabilityWarning(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), EmitBitTestIntrinsic(), clang::CIRGen::CIRGenFunction::emitCXXThrowExpr(), emitGlobalDtorWithCXAAtExit(), emitIsPlatformVersionAtLeast(), clang::CodeGen::CodeGenFunction::EmitMSVCBuiltinExpr(), EmitMSVCRTSetJmp(), clang::CodeGen::CodeGenFunction::EmitMultiVersionResolver(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(), EmitTargetArchBuiltinExpr(), clang::HLSLFrontendAction::ExecuteAction(), clang::targets::AMDGPUTargetInfo::fillValidCPUList(), clang::targets::RISCVTargetInfo::fillValidCPUList(), clang::targets::X86TargetInfo::fillValidCPUList(), clang::targets::RISCVTargetInfo::fillValidTuneCPUList(), clang::DeclSpec::Finish(), clang::CodeGen::EHPersonality::get(), clang::targets::X86TargetInfo::getABI(), clang::analyze_scanf::ScanfSpecifier::getArgType(), clang::targets::ARMTargetInfo::getBuiltinVaListKind(), clang::targets::HexagonTargetInfo::getBuiltinVaListKind(), getCallingConvKind(), getCallingConvMangling(), getCCForDeclaratorChunk(), getCIRGenToUse(), getCodegenToUse(), getCreateFlagValue(), getInstrProfSection(), clang::targets::AMDGPUTargetInfo::getMaxPointerWidth(), getOffloadArch(), clang::targets::AMDGPUTargetInfo::getPointerWidthV(), clang::targets::SystemZTargetInfo::getPointerWidthV(), clang::CIRGen::CIRGenModule::getTargetCIRGenInfo(), clang::targets::AArch64TargetInfo::getTargetDefines(), clang::targets::AMDGPUTargetInfo::getTargetDefines(), clang::targets::ARMTargetInfo::getTargetDefines(), clang::targets::MicrosoftARM64TargetInfo::getTargetDefines(), clang::targets::PPCTargetInfo::getTargetDefines(), clang::targets::RISCVTargetInfo::getTargetDefines(), clang::targets::SparcV8TargetInfo::getTargetDefines(), clang::targets::SparcV9TargetInfo::getTargetDefines(), clang::targets::SystemZTargetInfo::getTargetDefines(), clang::targets::X86TargetInfo::getTargetDefines(), clang::targets::AMDGPUTargetInfo::getTargetID(), getTypeInfoLinkage(), handleAliasAttr(), handleAsDoubleBuiltin(), handleAvailabilityAttr(), handleBuiltinAliasAttr(), handleCodeModelAttr(), handleDeviceKernelAttr(), handleHlslClip(), handleHlslSplitdouble(), handleInterruptAttr(), handleMSPointerTypeQualifierAttr(), handleNakedAttr(), HandleNeonVectorTypeAttr(), clang::SemaHLSL::handleNumThreadsAttr(), handlePackedAttr(), handlePatchableFunctionEntryAttr(), handleTargetClonesAttr(), clang::targets::AMDGPUTargetInfo::handleTargetFeatures(), clang::targets::PPCTargetInfo::handleTargetFeatures(), clang::targets::RISCVTargetInfo::handleTargetFeatures(), clang::targets::SystemZTargetInfo::handleTargetFeatures(), handleTargetVersionAttr(), handleWeakImportAttr(), clang::targets::AMDGPUTargetInfo::hasBFloat16Type(), clang::targets::LoongArchTargetInfo::hasFeature(), clang::targets::RISCVTargetInfo::hasFeature(), clang::targets::X86TargetInfo::hasFeature(), hasPS4DLLImportExport(), clang::targets::AMDGPUTargetInfo::initFeatureMap(), clang::targets::ARMTargetInfo::initFeatureMap(), clang::targets::LoongArchTargetInfo::initFeatureMap(), clang::targets::PPCTargetInfo::initFeatureMap(), clang::targets::RISCVTargetInfo::initFeatureMap(), clang::targets::SPIRV64AMDGCNTargetInfo::initFeatureMap(), clang::targets::X86TargetInfo::initFeatureMap(), InitializePredefinedMacros(), InitializeStandardPredefinedMacros(), clang::CodeGen::ABIInfo::isAndroid(), isArc4RandomAvailable(), clang::targets::ARMTargetInfo::isBranchProtectionSupportedArch(), isDefaultStdCall(), clang::FunctionDecl::isMSVCRTEntryPoint(), isNonViableMultiVersionOverload(), clang::CodeGen::ABIInfo::isOHOSFamily(), isPermittedNeonBaseType(), isSEHTrySupported(), isTargetArch(), isTargetEnvironment(), isTargetOS(), isTargetVariantEnvironment(), isTargetVariantOS(), isTargetVendor(), isThreadWrapperReplaceable(), isTrivialForMSVC(), clang::targets::AMDGPUTargetInfo::isValidCPUName(), clang::targets::RISCVTargetInfo::isValidCPUName(), clang::targets::X86TargetInfo::isValidCPUName(), clang::targets::RISCVTargetInfo::isValidTuneCPUName(), isVarDeclStrongDefinition(), IsVectorConversion(), clang::SemaHLSL::mergeVkConstantIdAttr(), MultiVersionTypesCompatible(), patchDefaultTargetVersion(), clang::targets::PPC32TargetInfo::PPC32TargetInfo(), clang::Preprocessor::processPathForFileMacro(), ReferenceDllExportedMembers(), clang::targets::AMDGPUTargetInfo::setCPU(), clang::targets::X86TargetInfo::setCPU(), clang::targets::PPC64TargetInfo::setMaxAtomicWidth(), clang::targets::MipsTargetInfo::setN32N64ABITypes(), clang::targets::MipsTargetInfo::setN64ABITypes(), clang::targets::AMDGPUTargetInfo::setSupportedOpenCLOpts(), ShouldDiagnoseAvailabilityInContext(), shouldDLLImportComdatSymbols(), clang::targets::SparcV8TargetInfo::SparcV8TargetInfo(), clang::targets::SparcV9TargetInfo::SparcV9TargetInfo(), clang::targets::SPIRTargetInfo::SPIRTargetInfo(), clang::targets::SPIRV32TargetInfo::SPIRV32TargetInfo(), clang::targets::SPIRV64AMDGCNTargetInfo::SPIRV64AMDGCNTargetInfo(), clang::targets::SPIRV64TargetInfo::SPIRV64TargetInfo(), clang::targets::RISCVTargetInfo::supportsCpuInit(), clang::targets::PPCTargetInfo::supportsCpuIs(), clang::targets::RISCVTargetInfo::supportsCpuIs(), clang::targets::PPCTargetInfo::supportsCpuSupports(), clang::targets::RISCVTargetInfo::supportsCpuSupports(), clang::targets::X86TargetInfo::supportsExtendIntArgs(), supportsIFunc(), supportsMultiVersioning(), clang::targets::PPCTargetInfo::validateCpuIs(), clang::targets::RISCVTargetInfo::validateCpuIs(), clang::targets::PPCTargetInfo::validateCpuSupports(), clang::targets::AArch64TargetInfo::validateGlobalRegisterVariable(), clang::targets::RISCVTargetInfo::validateGlobalRegisterVariable(), clang::targets::AArch64TargetInfo::validateTarget(), clang::targets::MipsTargetInfo::validateTarget(), clang::targets::WindowsX86_32TargetInfo::WindowsX86_32TargetInfo(), wrapWithBPFPreserveStaticOffset(), clang::targets::X86_64TargetInfo::X86_64TargetInfo(), and clang::targets::X86TargetInfo::X86TargetInfo().

◆ getTypeAlign()

◆ getTypeConstantSuffix()

◆ getTypeFormatModifier()

const char * TargetInfo::getTypeFormatModifier ( IntType T)
static

◆ getTypeName()

◆ getTypeWidth()

◆ getUInt16Type()

IntType clang::TargetInfo::getUInt16Type ( ) const
inline

◆ getUInt64Type()

IntType clang::TargetInfo::getUInt64Type ( ) const
inline

◆ getUIntMaxType()

IntType clang::TargetInfo::getUIntMaxType ( ) const
inline

◆ getUIntPtrType()

IntType clang::TargetInfo::getUIntPtrType ( ) const
inline

◆ getUnsignedAccumIBits()

unsigned clang::TargetInfo::getUnsignedAccumIBits ( ) const
inline

◆ getUnsignedAccumScale()

unsigned clang::TargetInfo::getUnsignedAccumScale ( ) const
inline

getUnsignedAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned _Accum' type.

Definition at line 621 of file TargetInfo.h.

References clang::TransferrableTargetInfo::AccumScale, and clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint.

Referenced by getUnsignedAccumIBits(), and InitializePredefinedMacros().

◆ getUnsignedFractScale()

unsigned clang::TargetInfo::getUnsignedFractScale ( ) const
inline

getUnsignedFractScale - Return the number of fractional bits in a 'unsigned _Fract' type.

Definition at line 661 of file TargetInfo.h.

References getFractScale(), and clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint.

Referenced by InitializePredefinedMacros().

◆ getUnsignedLongAccumIBits()

◆ getUnsignedLongAccumScale()

unsigned clang::TargetInfo::getUnsignedLongAccumScale ( ) const
inline

getUnsignedLongAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned long _Accum' type.

Definition at line 631 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongAccumScale, and clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint.

Referenced by getUnsignedLongAccumIBits(), and InitializePredefinedMacros().

◆ getUnsignedLongFractScale()

unsigned clang::TargetInfo::getUnsignedLongFractScale ( ) const
inline

getUnsignedLongFractScale - Return the number of fractional bits in a 'unsigned long _Fract' type.

Definition at line 667 of file TargetInfo.h.

References getLongFractScale(), and clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint.

Referenced by InitializePredefinedMacros().

◆ getUnsignedPtrDiffType()

IntType clang::TargetInfo::getUnsignedPtrDiffType ( LangAS AddrSpace) const
inline

Definition at line 408 of file TargetInfo.h.

References getCorrespondingUnsignedType(), and getPtrDiffType().

◆ getUnsignedShortAccumIBits()

◆ getUnsignedShortAccumScale()

unsigned clang::TargetInfo::getUnsignedShortAccumScale ( ) const
inline

getUnsignedShortAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned short _Accum' type.

Definition at line 610 of file TargetInfo.h.

References clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint, and clang::TransferrableTargetInfo::ShortAccumScale.

Referenced by getUnsignedShortAccumIBits(), and InitializePredefinedMacros().

◆ getUnsignedShortFractScale()

unsigned clang::TargetInfo::getUnsignedShortFractScale ( ) const
inline

getUnsignedShortFractScale - Return the number of fractional bits in a 'unsigned short _Fract' type.

Definition at line 654 of file TargetInfo.h.

References getShortFractScale(), and clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint.

Referenced by InitializePredefinedMacros().

◆ getUnwindWordWidth()

virtual unsigned clang::TargetInfo::getUnwindWordWidth ( ) const
inlinevirtual

Reimplemented in clang::targets::MipsTargetInfo, and clang::targets::X86_64TargetInfo.

Definition at line 893 of file TargetInfo.h.

References clang::Default, and getPointerWidth().

Referenced by parseModeAttrArg().

◆ getUserLabelPrefix()

const char * clang::TargetInfo::getUserLabelPrefix ( ) const
inline

Returns the default value of the USER_LABEL_PREFIX macro, which is the prefix given to user symbols by default.

On most platforms this is "", but it is "_" on some.

Definition at line 921 of file TargetInfo.h.

References UserLabelPrefix.

Referenced by InitializePredefinedMacros(), and clang::MangleContext::mangleName().

◆ getVScaleRange()

virtual std::optional< std::pair< unsigned, unsigned > > clang::TargetInfo::getVScaleRange ( const LangOptions & LangOpts,
ArmStreamingKind Mode,
llvm::StringMap< bool > * FeatureMap = nullptr ) const
inlinevirtual

Returns target-specific min and max values VScale_Range.

Reimplemented in clang::targets::AArch64TargetInfo, and clang::targets::RISCVTargetInfo.

Definition at line 1045 of file TargetInfo.h.

Referenced by HandleRISCVRVVVectorBitsTypeAttr(), and clang::CodeGen::CodeGenFunction::StartFunction().

◆ getVtblPtrAddressSpace()

virtual unsigned clang::TargetInfo::getVtblPtrAddressSpace ( ) const
inlinevirtual
Returns
Target specific vtbl ptr address space.

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 1839 of file TargetInfo.h.

◆ getWCharAlign()

unsigned clang::TargetInfo::getWCharAlign ( ) const
inline

Definition at line 768 of file TargetInfo.h.

References getTypeAlign(), and clang::TransferrableTargetInfo::WCharType.

◆ getWCharType()

IntType clang::TargetInfo::getWCharType ( ) const
inline

Definition at line 415 of file TargetInfo.h.

References clang::TransferrableTargetInfo::WCharType.

Referenced by EvaluateValue(), and InitializePredefinedMacros().

◆ getWCharWidth()

unsigned clang::TargetInfo::getWCharWidth ( ) const
inline

getWCharWidth/Align - Return the size of 'wchar_t' for this target, in bits.

Definition at line 767 of file TargetInfo.h.

References getTypeWidth(), and clang::TransferrableTargetInfo::WCharType.

Referenced by clang::CharLiteralParser::CharLiteralParser(), and EvaluateValue().

◆ getWIntType()

IntType clang::TargetInfo::getWIntType ( ) const
inline

Definition at line 416 of file TargetInfo.h.

References clang::TransferrableTargetInfo::WIntType.

Referenced by InitializePredefinedMacros().

◆ getZeroLengthBitfieldBoundary()

unsigned clang::TargetInfo::getZeroLengthBitfieldBoundary ( ) const
inline

Get the fixed alignment value in bits for a member that follows a zero length bitfield.

Definition at line 960 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ZeroLengthBitfieldBoundary.

◆ handleAsmEscapedChar()

virtual std::optional< std::string > clang::TargetInfo::handleAsmEscapedChar ( char C) const
inlinevirtual

Replace some escaped characters with another string based on target-specific rules.

Reimplemented in clang::targets::AVRTargetInfo, and clang::targets::M68kTargetInfo.

Definition at line 1274 of file TargetInfo.h.

References clang::C.

Referenced by clang::GCCAsmStmt::AnalyzeAsmString().

◆ handleTargetFeatures()

virtual bool clang::TargetInfo::handleTargetFeatures ( std::vector< std::string > & Features,
DiagnosticsEngine & Diags )
inlinevirtual

Perform initialization based on the user configured set of features (e.g., +sse4).

The list is guaranteed to have at most one entry per feature.

The target may modify the features list, to change which options are passed onwards to the backend. FIXME: This part should be fixed so that we can change handleTargetFeatures to merely a TargetInfo initialization routine.

Returns
False on error.

Reimplemented in clang::targets::AArch64TargetInfo, clang::targets::AMDGPUTargetInfo, clang::targets::ARMTargetInfo, clang::targets::BPFTargetInfo, clang::targets::CSKYTargetInfo, clang::targets::DarwinI386TargetInfo, clang::targets::DarwinX86_64TargetInfo, clang::targets::HexagonTargetInfo, clang::targets::LoongArchTargetInfo, clang::targets::MipsTargetInfo, clang::targets::PPCTargetInfo, clang::targets::RISCVTargetInfo, clang::targets::SparcTargetInfo, clang::targets::SystemZTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1520 of file TargetInfo.h.

◆ hardwareInterferenceSizes()

virtual std::pair< unsigned, unsigned > clang::TargetInfo::hardwareInterferenceSizes ( ) const
inlinevirtual

The first value in the pair is the minimum offset between two objects to avoid false sharing (destructive interference).

The second value in the pair is maximum size of contiguous memory to promote true sharing (constructive interference). Neither of these values are considered part of the ABI and can be changed by targets at any time.

Reimplemented in clang::targets::AArch64TargetInfo, clang::targets::AMDGPUTargetInfo, clang::targets::ARMTargetInfo, clang::targets::AVRTargetInfo, clang::targets::BPFTargetInfo, clang::targets::HexagonTargetInfo, clang::targets::M68kTargetInfo, clang::targets::MipsTargetInfo, clang::targets::PPC32TargetInfo, clang::targets::PPC64TargetInfo, clang::targets::RISCVTargetInfo, clang::targets::SparcTargetInfo, and clang::targets::SystemZTargetInfo.

Definition at line 1899 of file TargetInfo.h.

Referenced by InitializePredefinedMacros().

◆ hasAArch64ACLETypes()

bool clang::TargetInfo::hasAArch64ACLETypes ( ) const
inline

Returns whether or not the AArch64 ACLE built-in types are available on this target.

Definition at line 1066 of file TargetInfo.h.

References HasAArch64ACLETypes.

◆ hasAlignMac68kSupport()

bool clang::TargetInfo::hasAlignMac68kSupport ( ) const
inline

Check whether this target support '#pragma options align=mac68k'.

Definition at line 979 of file TargetInfo.h.

References HasAlignMac68kSupport.

◆ hasBFloat16Type()

virtual bool clang::TargetInfo::hasBFloat16Type ( ) const
inlinevirtual

◆ hasBitIntType()

virtual bool clang::TargetInfo::hasBitIntType ( ) const
inlinevirtual

Determine whether the _BitInt type is supported on this target.

This limitation is put into place for ABI reasons. FIXME: _BitInt is a required type in C23, so there's not much utility in asking whether the target supported it or not; I think this should be removed once backends have been alerted to the type and have had the chance to do implementation work if needed.

Reimplemented in clang::targets::AArch64TargetInfo, clang::targets::AMDGPUTargetInfo, clang::targets::ARCTargetInfo, clang::targets::ARMTargetInfo, clang::targets::BaseSPIRTargetInfo, clang::targets::CSKYTargetInfo, clang::targets::HexagonTargetInfo, clang::targets::LanaiTargetInfo, clang::targets::LoongArchTargetInfo, clang::targets::MipsTargetInfo, clang::targets::NVPTXTargetInfo, clang::targets::PPCTargetInfo, clang::targets::RISCVTargetInfo, clang::targets::SparcV8TargetInfo, clang::targets::SparcV9TargetInfo, clang::targets::SystemZTargetInfo, clang::targets::X86_32TargetInfo, clang::targets::X86_64TargetInfo, and clang::targets::XCoreTargetInfo.

Definition at line 684 of file TargetInfo.h.

Referenced by ConvertDeclSpecToType().

◆ hasBuiltinAtomic()

virtual bool clang::TargetInfo::hasBuiltinAtomic ( uint64_t AtomicSizeInBits,
uint64_t AlignmentInBits ) const
inlinevirtual

Returns true if the given target supports lock-free atomic operations at the specified width and alignment.

Definition at line 859 of file TargetInfo.h.

References getCharWidth(), and getMaxAtomicInlineWidth().

Referenced by getLockFreeValue().

◆ hasBuiltinMSVaList()

bool clang::TargetInfo::hasBuiltinMSVaList ( ) const
inline

Returns whether or not type __builtin_ms_va_list type is available on this target.

Definition at line 1062 of file TargetInfo.h.

References HasBuiltinMSVaList.

◆ hasCheapUnalignedBitFieldAccess()

bool clang::TargetInfo::hasCheapUnalignedBitFieldAccess ( ) const
inline

Return true iff unaligned accesses are cheap.

This affects placement and size of bitfield loads/stores. (Not the ABI-mandated placement of the bitfields themselves.)

Definition at line 912 of file TargetInfo.h.

References hasUnalignedAccess().

◆ hasFastHalfType()

virtual bool clang::TargetInfo::hasFastHalfType ( ) const
inlinevirtual

Determine whether the target has fast native support for operations on half types.

Definition at line 706 of file TargetInfo.h.

References HasFastHalfType.

Referenced by clang::CodeGen::CodeGenFunction::EmitCommonNeonBuiltinExpr(), and clang::QualType::UseExcessPrecision().

◆ hasFeature()

◆ hasFeatureEnabled()

virtual bool clang::TargetInfo::hasFeatureEnabled ( const llvm::StringMap< bool > & Features,
StringRef Name ) const
inlinevirtual

◆ hasFloat128Type()

virtual bool clang::TargetInfo::hasFloat128Type ( ) const
inlinevirtual

Determine whether the __float128 type is supported on this target.

Definition at line 712 of file TargetInfo.h.

References HasFloat128.

Referenced by ConvertDeclSpecToType(), getRealTypeByWidth(), clang::targets::AMDGPUTargetInfo::setAuxTarget(), and clang::targets::SPIRV64AMDGCNTargetInfo::setAuxTarget().

◆ hasFloat16Type()

virtual bool clang::TargetInfo::hasFloat16Type ( ) const
inlinevirtual

Determine whether the _Float16 type is supported on this target.

Definition at line 715 of file TargetInfo.h.

References HasFloat16.

Referenced by ConvertDeclSpecToType(), InitializePredefinedMacros(), and clang::QualType::UseExcessPrecision().

◆ hasFPReturn()

virtual bool clang::TargetInfo::hasFPReturn ( ) const
inlinevirtual

Determine whether return of a floating point value is supported on this target.

Definition at line 734 of file TargetInfo.h.

References HasFPReturn.

Referenced by clang::Sema::checkTypeSupport().

◆ hasFullBFloat16Type()

virtual bool clang::TargetInfo::hasFullBFloat16Type ( ) const
inlinevirtual

Determine whether the BFloat type is fully supported on this target, i.e arithemtic operations.

Definition at line 724 of file TargetInfo.h.

References HasFullBFloat16.

Referenced by clang::QualType::UseExcessPrecision().

◆ hasHIPImageSupport()

virtual bool clang::TargetInfo::hasHIPImageSupport ( ) const
inlinevirtual

Whether to support HIP image/texture API's.

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 1892 of file TargetInfo.h.

Referenced by InitializeStandardPredefinedMacros().

◆ hasIbm128Type()

virtual bool clang::TargetInfo::hasIbm128Type ( ) const
inlinevirtual

Determine whether the __ibm128 type is supported on this target.

Definition at line 727 of file TargetInfo.h.

References HasIbm128.

Referenced by ConvertDeclSpecToType(), and getRealTypeByWidth().

◆ hasInt128Type()

◆ hasLongDoubleType()

virtual bool clang::TargetInfo::hasLongDoubleType ( ) const
inlinevirtual

Determine whether the long double type is supported on this target.

Definition at line 730 of file TargetInfo.h.

References HasLongDouble.

Referenced by clang::Sema::checkTypeSupport(), and DetectPrecisionLossInComplexDivision().

◆ hasMicrosoftRecordLayout()

bool clang::TargetInfo::hasMicrosoftRecordLayout ( ) const
inline

Definition at line 1872 of file TargetInfo.h.

References HasMicrosoftRecordLayout.

◆ hasNoAsmVariants()

bool clang::TargetInfo::hasNoAsmVariants ( ) const
inline

Return true if {|} are normal characters in the asm string.

If this returns false (the default), then {abc|xyz} is syntax that says that when compiling for asm variant #0, "abc" should be generated, but when compiling for asm variant #1, "xyz" should be generated.

Definition at line 1642 of file TargetInfo.h.

References NoAsmVariants.

◆ hasProtectedVisibility()

virtual bool clang::TargetInfo::hasProtectedVisibility ( ) const
inlinevirtual

Does this target support "protected" visibility?

Any target which dynamic libraries will naturally support something like "default" (meaning that the symbol is visible outside this shared object) and "hidden" (meaning that it isn't) visibilities, but "protected" is really an ELF-specific concept with weird semantics designed around the convenience of dynamic linker implementations. Which is not to suggest that there's consistent target-independent semantics for "default" visibility either; the entire thing is pretty badly mangled.

Reimplemented in clang::targets::AppleMachOTargetInfo< AArch64leTargetInfo >, clang::targets::AppleMachOTargetInfo< ARMleTargetInfo >, clang::targets::AppleMachOTargetInfo< X86_32TargetInfo >, and clang::targets::AppleMachOTargetInfo< X86_64TargetInfo >.

Definition at line 1322 of file TargetInfo.h.

Referenced by handleVisibilityAttr().

◆ hasPS4DLLImportExport()

virtual bool clang::TargetInfo::hasPS4DLLImportExport ( ) const
inlinevirtual

Definition at line 1332 of file TargetInfo.h.

References getTriple().

Referenced by ShouldUseExternalRTTIDescriptor().

◆ hasRISCVVTypes()

bool clang::TargetInfo::hasRISCVVTypes ( ) const
inline

Returns whether or not the RISC-V V built-in types are available on this target.

Definition at line 1070 of file TargetInfo.h.

References HasRISCVVTypes.

Referenced by clang::Sema::checkTypeSupport().

◆ hasSjLjLowering()

virtual bool clang::TargetInfo::hasSjLjLowering ( ) const
inlinevirtual

Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp.

Reimplemented in clang::targets::ARMTargetInfo, clang::targets::PPCTargetInfo, clang::targets::SystemZTargetInfo, clang::targets::VETargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1775 of file TargetInfo.h.

◆ hasStrictFP()

virtual bool clang::TargetInfo::hasStrictFP ( ) const
inlinevirtual

Determine whether constrained floating point is supported on this target.

Definition at line 737 of file TargetInfo.h.

References HasStrictFP.

◆ hasUnalignedAccess()

bool clang::TargetInfo::hasUnalignedAccess ( ) const
inline

Return true iff unaligned accesses are a single instruction (rather than a synthesized sequence).

Definition at line 907 of file TargetInfo.h.

References HasUnalignedAccess.

Referenced by hasCheapUnalignedBitFieldAccess().

◆ initFeatureMap()

◆ isAddressSpaceSupersetOf()

virtual bool clang::TargetInfo::isAddressSpaceSupersetOf ( LangAS A,
LangAS B ) const
inlinevirtual

Returns true if an address space can be safely converted to another.

Parameters
Aaddress space of target in source language.
Baddress space of source in source language.

Reimplemented in clang::targets::AMDGPUTargetInfo, and clang::targets::NVPTXTargetInfo.

Definition at line 507 of file TargetInfo.h.

Referenced by clang::Qualifiers::isTargetAddressSpaceSupersetOf().

◆ isBigEndian()

bool clang::TargetInfo::isBigEndian ( ) const
inline

◆ isBranchProtectionSupportedArch()

virtual bool clang::TargetInfo::isBranchProtectionSupportedArch ( StringRef Arch) const
inlinevirtual

Determine if the Architecture in this TargetInfo supports branch protection.

Reimplemented in clang::targets::ARMTargetInfo.

Definition at line 1495 of file TargetInfo.h.

References Arch.

◆ isCLZForZeroUndef()

virtual bool clang::TargetInfo::isCLZForZeroUndef ( ) const
inlinevirtual

The __builtin_clz* and __builtin_ctz* built-in functions are specified to have undefined results for zero inputs, but on targets that support these operations in a way that provides well-defined results for zero without loss of performance, it is a good idea to avoid optimizing based on that undef behavior.

Reimplemented in clang::targets::AArch64TargetInfo, clang::targets::ARCTargetInfo, clang::targets::ARMTargetInfo, clang::targets::HexagonTargetInfo, clang::targets::MipsTargetInfo, and clang::targets::PPCTargetInfo.

Definition at line 1054 of file TargetInfo.h.

◆ isLittleEndian()

◆ isNan2008()

virtual bool clang::TargetInfo::isNan2008 ( ) const
inlinevirtual

Returns true if NaN encoding is IEEE 754-2008.

Only MIPS allows a different encoding.

Reimplemented in clang::targets::MipsTargetInfo.

Definition at line 1283 of file TargetInfo.h.

Referenced by clang::interp::interp__builtin_nan().

◆ isReadOnlyFeature()

bool clang::TargetInfo::isReadOnlyFeature ( StringRef Feature) const
inline

Determine whether the given target feature is read only.

Definition at line 1531 of file TargetInfo.h.

References Feature, and ReadOnlyFeatures.

◆ isSEHTrySupported()

bool clang::TargetInfo::isSEHTrySupported ( ) const
inline

Whether the target supports SEH __try.

Definition at line 1630 of file TargetInfo.h.

References getTriple().

◆ isSPRegName()

virtual bool clang::TargetInfo::isSPRegName ( StringRef ) const
inlinevirtual

◆ isTLSSupported()

bool clang::TargetInfo::isTLSSupported ( ) const
inline

Whether the target supports thread-local storage.

Definition at line 1616 of file TargetInfo.h.

References TLSSupported.

Referenced by handleDeclspecThreadAttr().

◆ isTypeSigned()

◆ isValidClobber()

bool TargetInfo::isValidClobber ( StringRef Name) const

Returns whether the passed in string is a valid clobber in an inline asm statement.

isValidClobber - Returns whether the passed in string is a valid clobber in an inline asm statement.

This is used by Sema.

Definition at line 668 of file TargetInfo.cpp.

References isValidGCCRegisterName().

◆ isValidCPUName()

◆ isValidFeatureName()

virtual bool clang::TargetInfo::isValidFeatureName ( StringRef Feature) const
inlinevirtual

Determine whether this TargetInfo supports the given feature.

Reimplemented in clang::targets::ARMTargetInfo, clang::targets::LoongArchTargetInfo, clang::targets::RISCVTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1431 of file TargetInfo.h.

References Feature.

Referenced by CheckMultiVersionValue().

◆ isValidGCCRegisterName()

bool TargetInfo::isValidGCCRegisterName ( StringRef Name) const
virtual

Returns whether the passed in string is a valid register name according to GCC.

isValidGCCRegisterName - Returns whether the passed in string is a valid register name according to GCC.

This is used by Sema for inline asm statements.

Reimplemented in clang::targets::BPFTargetInfo.

Definition at line 676 of file TargetInfo.cpp.

References getGCCAddlRegNames(), getGCCRegAliases(), getGCCRegNames(), clang::isDigit(), and removeGCCRegisterPrefix().

Referenced by getNormalizedGCCRegisterName(), and isValidClobber().

◆ isValidTuneCPUName()

virtual bool clang::TargetInfo::isValidTuneCPUName ( StringRef Name) const
inlinevirtual

Determine whether this TargetInfo supports the given CPU name for tuning.

Reimplemented in clang::targets::RISCVTargetInfo, clang::targets::SystemZTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1391 of file TargetInfo.h.

References isValidCPUName().

◆ isVLASupported()

bool clang::TargetInfo::isVLASupported ( ) const
inline

Whether target supports variable-length arrays.

Definition at line 1627 of file TargetInfo.h.

References VLASupported.

◆ noSignedCharForObjCBool()

void clang::TargetInfo::noSignedCharForObjCBool ( )
inline

◆ parseTargetAttr()

◆ resetDataLayout()

void TargetInfo::resetDataLayout ( StringRef DL,
const char * UserLabelPrefix = "" )
protected

Definition at line 197 of file TargetInfo.cpp.

References DataLayoutString, and UserLabelPrefix.

Referenced by clang::targets::AMDGPUTargetInfo::AMDGPUTargetInfo(), clang::targets::ARCTargetInfo::ARCTargetInfo(), clang::targets::AVRTargetInfo::AVRTargetInfo(), clang::targets::CSKYTargetInfo::CSKYTargetInfo(), clang::targets::CygwinARMTargetInfo::CygwinARMTargetInfo(), clang::targets::CygwinX86_32TargetInfo::CygwinX86_32TargetInfo(), clang::targets::DarwinI386TargetInfo::DarwinI386TargetInfo(), clang::targets::DarwinX86_64TargetInfo::DarwinX86_64TargetInfo(), clang::targets::DirectXTargetInfo::DirectXTargetInfo(), clang::targets::HexagonTargetInfo::HexagonTargetInfo(), clang::targets::LanaiTargetInfo::LanaiTargetInfo(), clang::targets::LoongArch32TargetInfo::LoongArch32TargetInfo(), clang::targets::LoongArch64TargetInfo::LoongArch64TargetInfo(), clang::targets::M68kTargetInfo::M68kTargetInfo(), clang::targets::MCUX86_32TargetInfo::MCUX86_32TargetInfo(), clang::targets::MSP430TargetInfo::MSP430TargetInfo(), clang::targets::NVPTXTargetInfo::NVPTXTargetInfo(), clang::targets::PPC32TargetInfo::PPC32TargetInfo(), clang::targets::RISCV32TargetInfo::RISCV32TargetInfo(), clang::targets::RISCV64TargetInfo::RISCV64TargetInfo(), clang::targets::RISCV32TargetInfo::setABI(), clang::targets::RISCV64TargetInfo::setABI(), clang::targets::WindowsARM64TargetInfo::setDataLayout(), clang::targets::SparcV8elTargetInfo::SparcV8elTargetInfo(), clang::targets::SparcV8TargetInfo::SparcV8TargetInfo(), clang::targets::SparcV9TargetInfo::SparcV9TargetInfo(), clang::targets::SPIR32TargetInfo::SPIR32TargetInfo(), clang::targets::SPIR64TargetInfo::SPIR64TargetInfo(), clang::targets::SPIRV32TargetInfo::SPIRV32TargetInfo(), clang::targets::SPIRV64AMDGCNTargetInfo::SPIRV64AMDGCNTargetInfo(), clang::targets::SPIRV64IntelTargetInfo::SPIRV64IntelTargetInfo(), clang::targets::SPIRV64TargetInfo::SPIRV64TargetInfo(), clang::targets::SPIRVTargetInfo::SPIRVTargetInfo(), clang::targets::SystemZTargetInfo::SystemZTargetInfo(), clang::targets::TCELETargetInfo::TCELETargetInfo(), clang::targets::TCETargetInfo::TCETargetInfo(), clang::targets::UEFIX86_64TargetInfo::UEFIX86_64TargetInfo(), clang::targets::VETargetInfo::VETargetInfo(), clang::targets::WebAssembly32TargetInfo::WebAssembly32TargetInfo(), clang::targets::WebAssembly64TargetInfo::WebAssembly64TargetInfo(), clang::targets::WindowsX86_32TargetInfo::WindowsX86_32TargetInfo(), clang::targets::X86_32TargetInfo::X86_32TargetInfo(), clang::targets::X86_64TargetInfo::X86_64TargetInfo(), clang::targets::XCoreTargetInfo::XCoreTargetInfo(), and clang::targets::XtensaTargetInfo::XtensaTargetInfo().

◆ resolveSymbolicName()

bool TargetInfo::resolveSymbolicName ( const char *& Name,
ArrayRef< ConstraintInfo > OutputConstraints,
unsigned & Index ) const

Definition at line 836 of file TargetInfo.cpp.

Referenced by validateAsmConstraint(), and validateInputConstraint().

◆ setABI()

◆ setAuxTarget()

virtual void clang::TargetInfo::setAuxTarget ( const TargetInfo * Aux)
inlinevirtual

◆ setCommandLineOpenCLOpts()

virtual void clang::TargetInfo::setCommandLineOpenCLOpts ( )
inlinevirtual

Set supported OpenCL extensions as written on command line.

Definition at line 1810 of file TargetInfo.h.

References getTargetOpts(), supportAllOpenCLOpts(), and V.

◆ setCPU()

◆ setFeatureEnabled()

virtual void clang::TargetInfo::setFeatureEnabled ( llvm::StringMap< bool > & Features,
StringRef Name,
bool Enabled ) const
inlinevirtual

Enable or disable a specific target feature; the feature name must be valid.

Reimplemented in clang::targets::AArch64TargetInfo, clang::targets::BPFTargetInfo, clang::targets::PPCTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1424 of file TargetInfo.h.

Referenced by initFeatureMap().

◆ setFPMath()

virtual bool clang::TargetInfo::setFPMath ( StringRef Name)
inlinevirtual

Use the specified unit for FP math.

Returns
False on error (invalid unit name).

Reimplemented in clang::targets::ARMTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1412 of file TargetInfo.h.

◆ setMaxAtomicWidth()

virtual void clang::TargetInfo::setMaxAtomicWidth ( )
inlinevirtual

◆ setSupportedOpenCLOpts()

virtual void clang::TargetInfo::setSupportedOpenCLOpts ( )
inlinevirtual

Set supported OpenCL extensions and optional core features.

Reimplemented in clang::targets::AMDGPUTargetInfo, clang::targets::BaseSPIRTargetInfo, clang::targets::NVPTXTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1801 of file TargetInfo.h.

◆ shouldDLLImportComdatSymbols()

virtual bool clang::TargetInfo::shouldDLLImportComdatSymbols ( ) const
inlinevirtual

Does this target aim for semantic compatibility with Microsoft C++ code using dllimport/export attributes?

Definition at line 1326 of file TargetInfo.h.

References getTriple().

Referenced by checkDLLAttributeRedeclaration(), and handleDLLAttr().

◆ shouldUseMicrosoftCCforMangling()

bool clang::TargetInfo::shouldUseMicrosoftCCforMangling ( ) const
inline

Should the Microsoft mangling scheme be used for C Calling Convention.

Definition at line 1365 of file TargetInfo.h.

References UseMicrosoftManglingForC.

Referenced by funcHasParameterSizeMangling(), and getCallingConvMangling().

◆ supportAllOpenCLOpts()

virtual void clang::TargetInfo::supportAllOpenCLOpts ( bool V = true)
inlinevirtual

◆ supportsCpuInit()

virtual bool clang::TargetInfo::supportsCpuInit ( ) const
inlinevirtual

Reimplemented in clang::targets::RISCVTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1559 of file TargetInfo.h.

◆ supportsCpuIs()

virtual bool clang::TargetInfo::supportsCpuIs ( ) const
inlinevirtual

◆ supportsCpuSupports()

virtual bool clang::TargetInfo::supportsCpuSupports ( ) const
inlinevirtual

◆ supportsExtendIntArgs()

virtual bool clang::TargetInfo::supportsExtendIntArgs ( ) const
inlinevirtual

Whether the option -fextend-arguments={32,64} is supported on the target.

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1709 of file TargetInfo.h.

◆ supportsIFunc()

◆ supportsMultiVersioning()

bool clang::TargetInfo::supportsMultiVersioning ( ) const
inline

Identify whether this target supports multiversioning of functions, which requires support for cpu_supports and cpu_is functionality.

Definition at line 1537 of file TargetInfo.h.

References getTriple().

Referenced by CheckMultiVersionAdditionalRules().

◆ supportSourceEvalMethod()

virtual bool clang::TargetInfo::supportSourceEvalMethod ( ) const
inlinevirtual

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 841 of file TargetInfo.h.

◆ supportsTargetAttributeTune()

virtual bool clang::TargetInfo::supportsTargetAttributeTune ( ) const
inlinevirtual

◆ useAddressSpaceMapMangling()

bool clang::TargetInfo::useAddressSpaceMapMangling ( ) const
inline

Specify if mangling based on address space map should be used or not for language specific address spaces.

Definition at line 1021 of file TargetInfo.h.

References UseAddrSpaceMapMangling.

Referenced by isAddrSpaceMapManglingEnabled().

◆ useBitFieldTypeAlignment()

bool clang::TargetInfo::useBitFieldTypeAlignment ( ) const
inline

Check whether the alignment of bit-field types is respected when laying out structures.

Definition at line 942 of file TargetInfo.h.

References clang::TransferrableTargetInfo::UseBitFieldTypeAlignment.

◆ useExplicitBitFieldAlignment()

bool clang::TargetInfo::useExplicitBitFieldAlignment ( ) const
inline

Check whether explicit bitfield alignment attributes should be.

Definition at line 974 of file TargetInfo.h.

References clang::TransferrableTargetInfo::UseExplicitBitFieldAlignment.

◆ useFP16ConversionIntrinsics()

virtual bool clang::TargetInfo::useFP16ConversionIntrinsics ( ) const
inlinevirtual

Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp16.

FIXME: This function should be removed once all targets stop using the conversion intrinsics.

Reimplemented in clang::targets::AArch64TargetInfo, clang::targets::AMDGPUTargetInfo, clang::targets::ARMTargetInfo, clang::targets::BaseSPIRTargetInfo, clang::targets::DirectXTargetInfo, clang::targets::LoongArchTargetInfo, clang::targets::NVPTXTargetInfo, clang::targets::RISCVTargetInfo, clang::targets::SystemZTargetInfo, clang::targets::WebAssemblyTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1015 of file TargetInfo.h.

Referenced by needsConversionOfHalfVec().

◆ useLeadingZeroLengthBitfield()

bool clang::TargetInfo::useLeadingZeroLengthBitfield ( ) const
inline

Check whether zero length bitfield alignment is respected if they are leading members.

Definition at line 954 of file TargetInfo.h.

References clang::TransferrableTargetInfo::UseLeadingZeroLengthBitfield.

◆ useObjCFP2RetForComplexLongDouble()

bool clang::TargetInfo::useObjCFP2RetForComplexLongDouble ( ) const
inline

Check whether _Complex long double should use the "fp2ret" flavor of Objective-C message passing on this target.

Definition at line 1007 of file TargetInfo.h.

References ComplexLongDoubleUsesFP2Ret.

◆ useObjCFPRetForRealType()

bool clang::TargetInfo::useObjCFPRetForRealType ( FloatModeKind T) const
inline

Check whether the given real type should use the "fpret" flavor of Objective-C message passing on this target.

Definition at line 1001 of file TargetInfo.h.

References RealTypeUsesObjCFPRetMask, and clang::T.

◆ useSignedCharForObjCBool()

bool clang::TargetInfo::useSignedCharForObjCBool ( ) const
inline

Check if the Objective-C built-in boolean type should be signed char.

Otherwise, if this returns false, the normal built-in boolean type should also be used for Objective-C.

Definition at line 933 of file TargetInfo.h.

References clang::TransferrableTargetInfo::UseSignedCharForObjCBool.

Referenced by InitializePredefinedMacros().

◆ useZeroLengthBitfieldAlignment()

bool clang::TargetInfo::useZeroLengthBitfieldAlignment ( ) const
inline

Check whether zero length bitfields should force alignment of the next member.

Definition at line 948 of file TargetInfo.h.

References clang::TransferrableTargetInfo::UseZeroLengthBitfieldAlignment.

◆ validateAsmConstraint()

◆ validateBranchProtection()

virtual bool clang::TargetInfo::validateBranchProtection ( StringRef Spec,
StringRef Arch,
BranchProtectionInfo & BPI,
const LangOptions & LO,
StringRef & Err ) const
inlinevirtual

Determine if this TargetInfo supports the given branch protection specification.

Reimplemented in clang::targets::AArch64TargetInfo, and clang::targets::ARMTargetInfo.

Definition at line 1501 of file TargetInfo.h.

References Arch.

◆ validateConstraintModifier()

virtual bool clang::TargetInfo::validateConstraintModifier ( StringRef ,
char ,
unsigned ,
std::string &  ) const
inlinevirtual

Reimplemented in clang::targets::AArch64TargetInfo, and clang::targets::ARMTargetInfo.

Definition at line 1248 of file TargetInfo.h.

◆ validateCpuIs()

virtual bool clang::TargetInfo::validateCpuIs ( StringRef Name) const
inlinevirtual

◆ validateCPUSpecificCPUDispatch()

virtual bool clang::TargetInfo::validateCPUSpecificCPUDispatch ( StringRef Name) const
inlinevirtual

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1577 of file TargetInfo.h.

Referenced by handleCPUSpecificAttr().

◆ validateCpuSupports()

virtual bool clang::TargetInfo::validateCpuSupports ( StringRef Name) const
inlinevirtual

◆ validateGlobalRegisterVariable()

virtual bool clang::TargetInfo::validateGlobalRegisterVariable ( StringRef RegName,
unsigned RegSize,
bool & HasSizeMismatch ) const
inlinevirtual

Validate register name used for global register variables.

This function returns true if the register passed in RegName can be used for global register variables on this target. In addition, it returns true in HasSizeMismatch if the size of the register doesn't match the variable size passed in RegSize.

Reimplemented in clang::targets::AArch64TargetInfo, clang::targets::RISCVTargetInfo, clang::targets::X86_64TargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1222 of file TargetInfo.h.

◆ validateInputConstraint()

◆ validateInputSize()

virtual bool clang::TargetInfo::validateInputSize ( const llvm::StringMap< bool > & FeatureMap,
StringRef ,
unsigned  ) const
inlinevirtual

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1242 of file TargetInfo.h.

◆ validateOpenCLTarget()

bool TargetInfo::validateOpenCLTarget ( const LangOptions & Opts,
DiagnosticsEngine & Diags ) const
virtual

Check that OpenCL target has valid options setting based on OpenCL version.

validateOpenCLTarget - Check that OpenCL target has valid options setting based on OpenCL version.

Definition at line 867 of file Targets.cpp.

References clang::OpenCLOptions::diagnoseFeatureExtensionDifferences(), clang::OpenCLOptions::diagnoseUnsupportedFeatureDependencies(), clang::LangOptions::getOpenCLCompatibleVersion(), clang::LangOptions::getOpenCLVersionTuple(), getSupportedOpenCLOpts(), hasFeatureEnabled(), clang::OpenCLOptions::isOpenCLOptionCoreIn(), and clang::DiagnosticsEngine::Report().

◆ validateOutputConstraint()

◆ validateOutputSize()

virtual bool clang::TargetInfo::validateOutputSize ( const llvm::StringMap< bool > & FeatureMap,
StringRef ,
unsigned  ) const
inlinevirtual

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1236 of file TargetInfo.h.

◆ validatePointerAuthKey()

bool TargetInfo::validatePointerAuthKey ( const llvm::APSInt & value) const
virtual

Determine whether the given pointer-authentication key is valid.

The value has been coerced to type 'int'.

Reimplemented in clang::targets::AArch64TargetInfo.

Definition at line 976 of file TargetInfo.cpp.

◆ validateTarget()

virtual bool clang::TargetInfo::validateTarget ( DiagnosticsEngine & Diags) const
inlinevirtual

Check the target is valid after it is fully initialized.

Reimplemented in clang::targets::AArch64TargetInfo, and clang::targets::MipsTargetInfo.

Definition at line 1861 of file TargetInfo.h.

Member Data Documentation

◆ AddrSpaceMap

◆ AllowAMDGPUUnsafeFPAtomics

unsigned clang::TargetInfo::AllowAMDGPUUnsafeFPAtomics
protected

Definition at line 280 of file TargetInfo.h.

Referenced by TargetInfo().

◆ ARMCDECoprocMask

unsigned clang::TargetInfo::ARMCDECoprocMask
protected

◆ AtomicOpts

AtomicOptions clang::TargetInfo::AtomicOpts
protected

Definition at line 309 of file TargetInfo.h.

Referenced by clang::targets::AMDGPUTargetInfo::adjust(), and getAtomicOpts().

◆ BigEndian

◆ ComplexLongDoubleUsesFP2Ret

unsigned clang::TargetInfo::ComplexLongDoubleUsesFP2Ret
protected

◆ DarwinTargetVariantTriple

std::optional<llvm::Triple> clang::TargetInfo::DarwinTargetVariantTriple
protected

Definition at line 291 of file TargetInfo.h.

Referenced by getDarwinTargetVariantTriple().

◆ DataLayoutString

std::string clang::TargetInfo::DataLayoutString
protected

Definition at line 252 of file TargetInfo.h.

Referenced by getDataLayoutString(), and resetDataLayout().

◆ HalfArgsAndReturns

◆ HasAArch64ACLETypes

unsigned clang::TargetInfo::HasAArch64ACLETypes
protected

◆ HasAlignMac68kSupport

◆ HasBFloat16

◆ HasBuiltinMSVaList

◆ HasFastHalfType

◆ HasFloat128

◆ HasFloat16

◆ HasFPReturn

bool clang::TargetInfo::HasFPReturn
protected

Definition at line 248 of file TargetInfo.h.

Referenced by hasFPReturn(), and TargetInfo().

◆ HasFullBFloat16

◆ HasIbm128

bool clang::TargetInfo::HasIbm128
protected

◆ HasLongDouble

bool clang::TargetInfo::HasLongDouble
protected

◆ HasMicrosoftRecordLayout

bool clang::TargetInfo::HasMicrosoftRecordLayout = false
protected

Definition at line 293 of file TargetInfo.h.

Referenced by adjust(), hasMicrosoftRecordLayout(), and TargetInfo().

◆ HasRISCVVTypes

unsigned clang::TargetInfo::HasRISCVVTypes
protected

◆ HasStrictFP

◆ HasUnalignedAccess

◆ MaxAtomicInlineWidth

unsigned char clang::TargetInfo::MaxAtomicInlineWidth
protected

Definition at line 251 of file TargetInfo.h.

Referenced by clang::targets::AArch64TargetInfo::AArch64TargetInfo(), clang::targets::PPCTargetInfo::adjust(), clang::targets::AMDGPUTargetInfo::AMDGPUTargetInfo(), clang::targets::BaseSPIRTargetInfo::BaseSPIRTargetInfo(), clang::targets::BPFTargetInfo::BPFTargetInfo(), clang::targets::CSKYTargetInfo::CSKYTargetInfo(), getMaxAtomicInlineWidth(), clang::targets::HexagonTargetInfo::HexagonTargetInfo(), clang::targets::NVPTXTargetInfo::NVPTXTargetInfo(), clang::targets::PPC32TargetInfo::PPC32TargetInfo(), clang::targets::LoongArch32TargetInfo::setMaxAtomicWidth(), clang::targets::LoongArch64TargetInfo::setMaxAtomicWidth(), clang::targets::PPC64TargetInfo::setMaxAtomicWidth(), clang::targets::RISCV32TargetInfo::setMaxAtomicWidth(), clang::targets::RISCV64TargetInfo::setMaxAtomicWidth(), clang::targets::X86_32TargetInfo::setMaxAtomicWidth(), clang::targets::X86_64TargetInfo::setMaxAtomicWidth(), clang::targets::MipsTargetInfo::setN32N64ABITypes(), clang::targets::MipsTargetInfo::setO32ABITypes(), clang::targets::SparcV8TargetInfo::SparcV8TargetInfo(), clang::targets::SparcV9TargetInfo::SparcV9TargetInfo(), clang::targets::SPIR32TargetInfo::SPIR32TargetInfo(), clang::targets::SPIR64TargetInfo::SPIR64TargetInfo(), clang::targets::SPIRV32TargetInfo::SPIRV32TargetInfo(), clang::targets::SPIRV64AMDGCNTargetInfo::SPIRV64AMDGCNTargetInfo(), clang::targets::SPIRV64TargetInfo::SPIRV64TargetInfo(), clang::targets::SystemZTargetInfo::SystemZTargetInfo(), TargetInfo(), clang::targets::VETargetInfo::VETargetInfo(), clang::targets::WebAssemblyTargetInfo::WebAssemblyTargetInfo(), clang::targets::X86_32TargetInfo::X86_32TargetInfo(), clang::targets::X86_64TargetInfo::X86_64TargetInfo(), and clang::targets::XtensaTargetInfo::XtensaTargetInfo().

◆ MaxAtomicPromoteWidth

◆ MaxBitIntWidth

std::optional<unsigned> clang::TargetInfo::MaxBitIntWidth
protected

Definition at line 289 of file TargetInfo.h.

Referenced by adjust(), getMaxBitIntWidth(), and TargetInfo().

◆ MaxOpenCLWorkGroupSize

unsigned clang::TargetInfo::MaxOpenCLWorkGroupSize
protected

Definition at line 287 of file TargetInfo.h.

Referenced by getMaxOpenCLWorkGroupSize(), and TargetInfo().

◆ MCountName

const char* clang::TargetInfo::MCountName
protected

◆ NoAsmVariants

◆ PlatformMinVersion

VersionTuple clang::TargetInfo::PlatformMinVersion
mutableprotected

◆ PlatformName

StringRef clang::TargetInfo::PlatformName
mutableprotected

◆ ReadOnlyFeatures

llvm::StringSet clang::TargetInfo::ReadOnlyFeatures
protected

◆ RealTypeUsesObjCFPRetMask

unsigned clang::TargetInfo::RealTypeUsesObjCFPRetMask
protected

◆ RegParmMax

◆ SSERegParmMax

unsigned char clang::TargetInfo::SSERegParmMax
protected

Definition at line 255 of file TargetInfo.h.

Referenced by TargetInfo().

◆ TheCXXABI

◆ TLSSupported

◆ UseAddrSpaceMapMangling

bool clang::TargetInfo::UseAddrSpaceMapMangling
protected

◆ UseMicrosoftManglingForC

◆ UserLabelPrefix

const char* clang::TargetInfo::UserLabelPrefix
protected

Definition at line 253 of file TargetInfo.h.

Referenced by getUserLabelPrefix(), resetDataLayout(), and TargetInfo().

◆ VLASupported


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