clang  14.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
clang::TargetInfo Class Referenceabstract

Exposes information about the current target. More...

#include "clang/Basic/TargetInfo.h"

Inheritance diagram for clang::TargetInfo:
Inheritance graph
[legend]
Collaboration diagram for clang::TargetInfo:
Collaboration graph
[legend]

Classes

struct  AddlRegName
 
struct  BranchProtectionInfo
 
struct  ConstraintInfo
 
struct  GCCRegAlias
 

Public Types

enum  BuiltinVaListKind {
  CharPtrBuiltinVaList = 0, VoidPtrBuiltinVaList, AArch64ABIBuiltinVaList, PNaClABIBuiltinVaList,
  PowerABIBuiltinVaList, X86_64ABIBuiltinVaList, AAPCSABIBuiltinVaList, SystemZBuiltinVaList,
  HexagonBuiltinVaList
}
 The different kinds of __builtin_va_list types defined by the target implementation. 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...
 
enum  RealType {
  NoFloat = 255, Float = 0, Double, LongDouble,
  Float128, Ibm128
}
 

Public Member Functions

virtual ~TargetInfo ()
 
TargetOptionsgetTargetOpts () const
 Retrieve the target options. More...
 
IntType getSizeType () const
 
IntType getSignedSizeType () const
 
IntType getIntMaxType () const
 
IntType getUIntMaxType () const
 
IntType getPtrDiffType (unsigned AddrSpace) const
 
IntType getUnsignedPtrDiffType (unsigned 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. More...
 
unsigned getTypeWidth (IntType T) const
 Return the width (in bits) of the specified integer type enum. More...
 
virtual IntType getIntTypeByWidth (unsigned BitWidth, bool IsSigned) const
 Return integer type with specified width. More...
 
virtual IntType getLeastIntTypeByWidth (unsigned BitWidth, bool IsSigned) const
 Return the smallest integer type with at least the specified width. More...
 
RealType getRealTypeByWidth (unsigned BitWidth, bool ExplicitIEEE) const
 Return floating point type with specified width. More...
 
unsigned getTypeAlign (IntType T) const
 Return the alignment (in bits) of the specified integer type enum. More...
 
uint64_t getPointerWidth (unsigned AddrSpace) const
 Return the width of pointers on this target, for the specified address space. More...
 
uint64_t getPointerAlign (unsigned AddrSpace) const
 
virtual uint64_t getMaxPointerWidth () const
 Return the maximum width of pointers on this target. More...
 
virtual uint64_t getNullPointerValue (LangAS AddrSpace) const
 Get integer value for null pointer. More...
 
unsigned getBoolWidth () const
 Return the size of '_Bool' and C++ 'bool' for this target, in bits. More...
 
unsigned getBoolAlign () const
 Return the alignment of '_Bool' and C++ 'bool' for this target. More...
 
unsigned getCharWidth () const
 
unsigned getCharAlign () const
 
unsigned getShortWidth () const
 Return the size of 'signed short' and 'unsigned short' for this target, in bits. More...
 
unsigned getShortAlign () const
 Return the alignment of 'signed short' and 'unsigned short' for this target. More...
 
unsigned getIntWidth () const
 getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for this target, in bits. More...
 
unsigned getIntAlign () const
 
unsigned getLongWidth () const
 getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' for this target, in bits. More...
 
unsigned getLongAlign () const
 
unsigned getLongLongWidth () const
 getLongLongWidth/Align - Return the size of 'signed long long' and 'unsigned long long' for this target, in bits. More...
 
unsigned getLongLongAlign () const
 
unsigned getShortAccumWidth () const
 getShortAccumWidth/Align - Return the size of 'signed short _Accum' and 'unsigned short _Accum' for this target, in bits. More...
 
unsigned getShortAccumAlign () const
 
unsigned getAccumWidth () const
 getAccumWidth/Align - Return the size of 'signed _Accum' and 'unsigned _Accum' for this target, in bits. More...
 
unsigned getAccumAlign () const
 
unsigned getLongAccumWidth () const
 getLongAccumWidth/Align - Return the size of 'signed long _Accum' and 'unsigned long _Accum' for this target, in bits. More...
 
unsigned getLongAccumAlign () const
 
unsigned getShortFractWidth () const
 getShortFractWidth/Align - Return the size of 'signed short _Fract' and 'unsigned short _Fract' for this target, in bits. More...
 
unsigned getShortFractAlign () const
 
unsigned getFractWidth () const
 getFractWidth/Align - Return the size of 'signed _Fract' and 'unsigned _Fract' for this target, in bits. More...
 
unsigned getFractAlign () const
 
unsigned getLongFractWidth () const
 getLongFractWidth/Align - Return the size of 'signed long _Fract' and 'unsigned long _Fract' for this target, in bits. More...
 
unsigned getLongFractAlign () const
 
unsigned getShortAccumScale () const
 getShortAccumScale/IBits - Return the number of fractional/integral bits in a 'signed short _Accum' type. More...
 
unsigned getShortAccumIBits () const
 
unsigned getAccumScale () const
 getAccumScale/IBits - Return the number of fractional/integral bits in a 'signed _Accum' type. More...
 
unsigned getAccumIBits () const
 
unsigned getLongAccumScale () const
 getLongAccumScale/IBits - Return the number of fractional/integral bits in a 'signed long _Accum' type. More...
 
unsigned getLongAccumIBits () const
 
unsigned getUnsignedShortAccumScale () const
 getUnsignedShortAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned short _Accum' type. More...
 
unsigned getUnsignedShortAccumIBits () const
 
unsigned getUnsignedAccumScale () const
 getUnsignedAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned _Accum' type. More...
 
unsigned getUnsignedAccumIBits () const
 
unsigned getUnsignedLongAccumScale () const
 getUnsignedLongAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned long _Accum' type. More...
 
unsigned getUnsignedLongAccumIBits () const
 
unsigned getShortFractScale () const
 getShortFractScale - Return the number of fractional bits in a 'signed short _Fract' type. More...
 
unsigned getFractScale () const
 getFractScale - Return the number of fractional bits in a 'signed _Fract' type. More...
 
unsigned getLongFractScale () const
 getLongFractScale - Return the number of fractional bits in a 'signed long _Fract' type. More...
 
unsigned getUnsignedShortFractScale () const
 getUnsignedShortFractScale - Return the number of fractional bits in a 'unsigned short _Fract' type. More...
 
unsigned getUnsignedFractScale () const
 getUnsignedFractScale - Return the number of fractional bits in a 'unsigned _Fract' type. More...
 
unsigned getUnsignedLongFractScale () const
 getUnsignedLongFractScale - Return the number of fractional bits in a 'unsigned long _Fract' type. More...
 
virtual bool hasInt128Type () const
 Determine whether the __int128 type is supported on this target. More...
 
virtual bool hasExtIntType () const
 Determine whether the _ExtInt type is supported on this target. More...
 
virtual bool hasLegalHalfType () const
 Determine whether _Float16 is supported on this target. More...
 
virtual bool hasFloat128Type () const
 Determine whether the __float128 type is supported on this target. More...
 
virtual bool hasFloat16Type () const
 Determine whether the _Float16 type is supported on this target. More...
 
virtual bool hasBFloat16Type () const
 Determine whether the _BFloat16 type is supported on this target. More...
 
virtual bool hasIbm128Type () const
 Determine whether the __ibm128 type is supported on this target. More...
 
virtual bool hasStrictFP () const
 Determine whether constrained floating point is supported on this target. More...
 
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). More...
 
unsigned getDefaultAlignForAttributeAligned () const
 Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified. More...
 
virtual unsigned getMinGlobalAlign (uint64_t) const
 getMinGlobalAlign - Return the minimum alignment of a global variable, unless its alignment is explicitly reduced via attributes. More...
 
unsigned getNewAlign () const
 Return the largest alignment for which a suitably-sized allocation with '::operator new(size_t)' or 'malloc' is guaranteed to produce a correctly-aligned pointer. More...
 
unsigned getWCharWidth () const
 getWCharWidth/Align - Return the size of 'wchar_t' for this target, in bits. More...
 
unsigned getWCharAlign () const
 
unsigned getChar16Width () const
 getChar16Width/Align - Return the size of 'char16_t' for this target, in bits. More...
 
unsigned getChar16Align () const
 
unsigned getChar32Width () const
 getChar32Width/Align - Return the size of 'char32_t' for this target, in bits. More...
 
unsigned getChar32Align () const
 
unsigned getHalfWidth () const
 getHalfWidth/Align/Format - Return the size/align/format of 'half'. More...
 
unsigned getHalfAlign () const
 
const llvm::fltSemantics & getHalfFormat () const
 
unsigned getFloatWidth () const
 getFloatWidth/Align/Format - Return the size/align/format of 'float'. More...
 
unsigned getFloatAlign () const
 
const llvm::fltSemantics & getFloatFormat () const
 
unsigned getBFloat16Width () const
 getBFloat16Width/Align/Format - Return the size/align/format of '__bf16'. More...
 
unsigned getBFloat16Align () const
 
const llvm::fltSemantics & getBFloat16Format () const
 
unsigned getDoubleWidth () const
 getDoubleWidth/Align/Format - Return the size/align/format of 'double'. More...
 
unsigned getDoubleAlign () const
 
const llvm::fltSemantics & getDoubleFormat () const
 
unsigned getLongDoubleWidth () const
 getLongDoubleWidth/Align/Format - Return the size/align/format of 'long double'. More...
 
unsigned getLongDoubleAlign () const
 
const llvm::fltSemantics & getLongDoubleFormat () const
 
unsigned getFloat128Width () const
 getFloat128Width/Align/Format - Return the size/align/format of '__float128'. More...
 
unsigned getFloat128Align () const
 
const llvm::fltSemantics & getFloat128Format () const
 
unsigned getIbm128Width () const
 getIbm128Width/Align/Format - Return the size/align/format of '__ibm128'. More...
 
unsigned getIbm128Align () const
 
const llvm::fltSemantics & getIbm128Format () const
 
virtual const char * getLongDoubleMangling () const
 Return the mangled code of long double. More...
 
virtual const char * getFloat128Mangling () const
 Return the mangled code of __float128. More...
 
virtual const char * getIbm128Mangling () const
 Return the mangled code of __ibm128. More...
 
virtual const char * getBFloat16Mangling () const
 Return the mangled code of bfloat. More...
 
virtual unsigned getFloatEvalMethod () const
 Return the value for the C99 FLT_EVAL_METHOD macro. More...
 
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. More...
 
unsigned getMaxAtomicInlineWidth () const
 Return the maximum width lock-free atomic operation which can be inlined given the supported features of the given target. More...
 
virtual void setMaxAtomicWidth ()
 Set the maximum inline or promote width lock-free atomic operation for the given target. More...
 
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. More...
 
unsigned getMaxVectorAlign () const
 Return the maximum vector alignment supported for the given target. More...
 
unsigned getSimdDefaultAlign () const
 Return default simd alignment for the given target. More...
 
unsigned getMaxOpenCLWorkGroupSize () const
 
virtual unsigned getExnObjectAlignment () const
 Return the alignment (in bits) of the thrown exception object. More...
 
unsigned getIntMaxTWidth () const
 Return the size of intmax_t and uintmax_t for this target, in bits. More...
 
virtual unsigned getUnwindWordWidth () const
 
virtual unsigned getRegisterWidth () const
 Return the "preferred" register width on this target. More...
 
const char * getUserLabelPrefix () const
 Returns the default value of the USER_LABEL_PREFIX macro, which is the prefix given to user symbols by default. More...
 
const char * getMCountName () const
 Returns the name of the mcount instrumentation function. More...
 
bool useSignedCharForObjCBool () const
 Check if the Objective-C built-in boolean type should be signed char. More...
 
void noSignedCharForObjCBool ()
 
bool useBitFieldTypeAlignment () const
 Check whether the alignment of bit-field types is respected when laying out structures. More...
 
bool useZeroLengthBitfieldAlignment () const
 Check whether zero length bitfields should force alignment of the next member. More...
 
bool useLeadingZeroLengthBitfield () const
 Check whether zero length bitfield alignment is respected if they are leading members. More...
 
unsigned getZeroLengthBitfieldBoundary () const
 Get the fixed alignment value in bits for a member that follows a zero length bitfield. More...
 
unsigned getMaxAlignedAttribute () const
 Get the maximum alignment in bits for a static variable with aligned attribute. More...
 
bool useExplicitBitFieldAlignment () const
 Check whether explicit bitfield alignment attributes should be. More...
 
bool hasAlignMac68kSupport () const
 Check whether this target support '#pragma options align=mac68k'. More...
 
const char * getTypeConstantSuffix (IntType T) const
 Return the constant suffix for the specified integer type enum. More...
 
bool useObjCFPRetForRealType (RealType T) const
 Check whether the given real type should use the "fpret" flavor of Objective-C message passing on this target. More...
 
bool useObjCFP2RetForComplexLongDouble () const
 Check whether _Complex long double should use the "fp2ret" flavor of Objective-C message passing on this target. More...
 
virtual bool useFP16ConversionIntrinsics () const
 Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp16. More...
 
bool useAddressSpaceMapMangling () const
 Specify if mangling based on address space map should be used or not for language specific address spaces. More...
 
virtual void getTargetDefines (const LangOptions &Opts, MacroBuilder &Builder) const =0
 ===-— Other target property query methods -----------------------—===// More...
 
virtual ArrayRef< Builtin::InfogetTargetBuiltins () 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. More...
 
virtual Optional< std::pair< unsigned, unsigned > > getVScaleRange (const LangOptions &LangOpts) const
 Returns target-specific min and max values VScale_Range. More...
 
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. More...
 
virtual BuiltinVaListKind getBuiltinVaListKind () const =0
 Returns the kind of __builtin_va_list type that should be used with this target. More...
 
bool hasBuiltinMSVaList () const
 Returns whether or not type __builtin_ms_va_list type is available on this target. More...
 
bool isRenderScriptTarget () const
 Returns true for RenderScript. More...
 
bool hasAArch64SVETypes () const
 Returns whether or not the AArch64 SVE built-in types are available on this target. More...
 
bool hasRISCVVTypes () const
 Returns whether or not the RISC-V V built-in types are available on this target. More...
 
bool allowAMDGPUUnsafeFPAtomics () const
 Returns whether or not the AMDGPU unsafe floating point atomics are allowed. More...
 
uint32_t getARMCDECoprocMask () const
 For ARM targets returns a mask defining which coprocessors are configured as Custom Datapath. More...
 
bool isValidClobber (StringRef Name) const
 Returns whether the passed in string is a valid clobber in an inline asm statement. More...
 
virtual bool isValidGCCRegisterName (StringRef Name) const
 Returns whether the passed in string is a valid register name according to GCC. More...
 
StringRef getNormalizedGCCRegisterName (StringRef Name, bool ReturnCanonical=false) const
 Returns the "normalized" GCC register name. More...
 
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. More...
 
virtual bool validateGlobalRegisterVariable (StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const
 Validate register name used for global register variables. More...
 
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 llvm::Optional< std::stringhandleAsmEscapedChar (char C) const
 Replace some escaped characters with another string based on target-specific rules. More...
 
virtual const char * getClobbers () const =0
 Returns a string of target-specific clobbers, in LLVM format. More...
 
virtual bool isNan2008 () const
 Returns true if NaN encoding is IEEE 754-2008. More...
 
const llvm::Triple & getTriple () const
 Returns the target triple of the primary target. More...
 
virtual llvm::Optional< std::stringgetTargetID () const
 Returns the target ID if supported. More...
 
const char * getDataLayoutString () const
 
virtual bool hasProtectedVisibility () const
 Does this target support "protected" visibility? More...
 
virtual bool shouldDLLImportComdatSymbols () const
 Does this target aim for semantic compatibility with Microsoft C++ code using dllimport/export attributes? More...
 
virtual bool hasPS4DLLImportExport () const
 
virtual void adjust (DiagnosticsEngine &Diags, LangOptions &Opts)
 Set forced language options. More...
 
virtual void adjustTargetOptions (const CodeGenOptions &CGOpts, TargetOptions &TargetOpts) const
 Adjust target options based on codegen options. More...
 
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. More...
 
virtual StringRef getABI () const
 Get the ABI currently in use. More...
 
TargetCXXABI getCXXABI () const
 Get the C++ ABI currently in use. More...
 
virtual bool setCPU (const std::string &Name)
 Target the specified CPU. More...
 
virtual void fillValidCPUList (SmallVectorImpl< StringRef > &Values) const
 Fill a SmallVectorImpl with the valid values to setCPU. More...
 
virtual void fillValidTuneCPUList (SmallVectorImpl< StringRef > &Values) const
 Fill a SmallVectorImpl with the valid values for tuning CPU. More...
 
virtual bool isValidCPUName (StringRef Name) const
 brief Determine whether this TargetInfo supports the given CPU name. More...
 
virtual bool isValidTuneCPUName (StringRef Name) const
 brief Determine whether this TargetInfo supports the given CPU name for More...
 
virtual bool supportsTargetAttributeTune () const
 brief Determine whether this TargetInfo supports tune in target attribute. More...
 
virtual bool setABI (const std::string &Name)
 Use the specified ABI. More...
 
virtual bool setFPMath (StringRef Name)
 Use the specified unit for FP math. More...
 
virtual bool hasFeatureEnabled (const llvm::StringMap< bool > &Features, StringRef Name) const
 Check if target has a given feature enabled. More...
 
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. More...
 
virtual bool isValidFeatureName (StringRef Feature) const
 Determine whether this TargetInfo supports the given feature. More...
 
virtual bool validateBranchProtection (StringRef Spec, BranchProtectionInfo &BPI, StringRef &Err) const
 Determine if this TargetInfo supports the given branch protection specification. More...
 
virtual bool handleTargetFeatures (std::vector< std::string > &Features, DiagnosticsEngine &Diags)
 Perform initialization based on the user configured set of features (e.g., +sse4). More...
 
virtual bool hasFeature (StringRef Feature) const
 Determine whether the given target has the given feature. More...
 
bool supportsMultiVersioning () const
 Identify whether this target supports multiversioning of functions, which requires support for cpu_supports and cpu_is functionality. More...
 
bool supportsIFunc () const
 Identify whether this target supports IFuncs. More...
 
virtual bool validateCpuSupports (StringRef Name) const
 
virtual unsigned multiVersionSortPriority (StringRef Name) const
 
virtual bool validateCpuIs (StringRef Name) const
 
virtual bool validateCPUSpecificCPUDispatch (StringRef Name) const
 
virtual char CPUSpecificManglingCharacter (StringRef Name) const
 
virtual void getCPUSpecificCPUDispatchFeatures (StringRef Name, llvm::SmallVectorImpl< StringRef > &Features) const
 
virtual Optional< unsignedgetCPUCacheLineSize () const
 
unsigned getRegParmMax () const
 
bool isTLSSupported () const
 Whether the target supports thread-local storage. More...
 
unsigned getMaxTLSAlign () const
 Return the maximum alignment (in bits) of a TLS variable. More...
 
bool isVLASupported () const
 Whether target supports variable-length arrays. More...
 
bool isSEHTrySupported () const
 Whether the target supports SEH __try. More...
 
bool hasNoAsmVariants () const
 Return true if {|} are normal characters in the asm string. More...
 
virtual int getEHDataRegisterNumber (unsigned RegNo) const
 Return the register number that __builtin_eh_return_regno would return with the specified argument. More...
 
virtual const char * getStaticInitSectionSpecifier () const
 Return the section to use for C++ static initialization functions. More...
 
const LangASMapgetAddressSpaceMap () const
 
virtual LangAS getOpenCLBuiltinAddressSpace (unsigned AS) const
 Map from the address space field in builtin description strings to the language address space. More...
 
virtual LangAS getCUDABuiltinAddressSpace (unsigned AS) const
 Map from the address space field in builtin description strings to the language address space. More...
 
virtual llvm::Optional< LangASgetConstantAddressSpace () const
 Return an AST address space which can be used opportunistically for constant global memory. More...
 
virtual const llvm::omp::GV & getGridValue () const
 
StringRef getPlatformName () const
 Retrieve the name of the platform as it is used in the availability attribute. More...
 
VersionTuple getPlatformMinVersion () const
 Retrieve the minimum desired version of the platform, to which the program should be compiled. More...
 
bool isBigEndian () const
 
bool isLittleEndian () const
 
virtual bool supportsExtendIntArgs () const
 Whether the option -fextend-arguments={32,64} is supported on the target. More...
 
virtual bool checkArithmeticFenceSupported () const
 Controls if __arithmetic_fence is supported in the targeted backend. More...
 
virtual CallingConv getDefaultCallingConv () const
 Gets the default calling convention for the given target and declaration context. More...
 
virtual CallingConvCheckResult checkCallingConvention (CallingConv CC) const
 Determines whether a given calling convention is valid for the target. More...
 
virtual CallingConvKind getCallingConvKind (bool ClangABICompat4) const
 
virtual bool hasSjLjLowering () const
 Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp. More...
 
virtual bool checkCFProtectionBranchSupported (DiagnosticsEngine &Diags) const
 Check if the target supports CFProtection branch. More...
 
virtual bool checkCFProtectionReturnSupported (DiagnosticsEngine &Diags) const
 Check if the target supports CFProtection branch. More...
 
virtual bool allowsLargerPreferedTypeAlignment () const
 Whether target allows to overalign ABI-specified preferred alignment. More...
 
virtual bool defaultsToAIXPowerAlignment () const
 Whether target defaults to the power alignment rules of AIX. More...
 
virtual void setSupportedOpenCLOpts ()
 Set supported OpenCL extensions and optional core features. More...
 
virtual void supportAllOpenCLOpts (bool V=true)
 
virtual void setCommandLineOpenCLOpts ()
 Set supported OpenCL extensions as written on command line. More...
 
llvm::StringMap< bool > & getSupportedOpenCLOpts ()
 Get supported OpenCL extensions and optional core features. More...
 
const llvm::StringMap< bool > & getSupportedOpenCLOpts () const
 Get const supported OpenCL extensions and optional core features. More...
 
virtual LangAS getOpenCLTypeAddrSpace (OpenCLTypeKind TK) const
 Get address space for OpenCL type. More...
 
virtual unsigned getVtblPtrAddressSpace () const
 
virtual 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. More...
 
virtual bool validateOpenCLTarget (const LangOptions &Opts, DiagnosticsEngine &Diags) const
 Check that OpenCL target has valid options setting based on OpenCL version. More...
 
virtual void setAuxTarget (const TargetInfo *Aux)
 
virtual bool allowDebugInfoForExternalRef () const
 Whether target allows debuginfo types for decl only variables/functions. More...
 

Static Public Member Functions

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

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. More...
 
virtual uint64_t getPointerWidthV (unsigned AddrSpace) const
 
virtual uint64_t getPointerAlignV (unsigned AddrSpace) const
 
virtual enum IntType getPtrDiffTypeV (unsigned 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 HasLegalHalfType
 
bool HasFloat128
 
bool HasFloat16
 
bool HasBFloat16
 
bool HasIbm128
 
bool HasStrictFP
 
unsigned char MaxAtomicPromoteWidth
 
unsigned char MaxAtomicInlineWidth
 
unsigned short SimdDefaultAlign
 
std::string DataLayoutString
 
const char * UserLabelPrefix
 
const char * MCountName
 
unsigned char RegParmMax
 
unsigned char SSERegParmMax
 
TargetCXXABI TheCXXABI
 
const LangASMapAddrSpaceMap
 
StringRef PlatformName
 
VersionTuple PlatformMinVersion
 
unsigned HasAlignMac68kSupport: 1
 
unsigned RealTypeUsesObjCFPRet: 3
 
unsigned ComplexLongDoubleUsesFP2Ret: 1
 
unsigned HasBuiltinMSVaList: 1
 
unsigned IsRenderScriptTarget: 1
 
unsigned HasAArch64SVETypes: 1
 
unsigned HasRISCVVTypes: 1
 
unsigned AllowAMDGPUUnsafeFPAtomics: 1
 
unsigned ARMCDECoprocMask: 8
 
unsigned MaxOpenCLWorkGroupSize
 
bool UseAddrSpaceMapMangling
 Specify if mangling based on address space map should be used or not for language specific address spaces. More...
 
- 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. More...
 
unsigned UseBitFieldTypeAlignment: 1
 Control whether the alignment of bit-field types is respected when laying out structures. More...
 
unsigned UseZeroLengthBitfieldAlignment: 1
 Whether zero length bitfields (e.g., int : 0;) force alignment of the next bitfield. More...
 
unsigned UseLeadingZeroLengthBitfield: 1
 Whether zero length bitfield alignment is respected if they are the leading members. More...
 
unsigned UseExplicitBitFieldAlignment: 1
 Whether explicit bit field alignment attributes are honored. More...
 
unsigned ZeroLengthBitfieldBoundary
 If non-zero, specifies a fixed alignment value for bitfields that follow zero length bitfield, regardless of the zero length bitfield type. More...
 
unsigned MaxAlignedAttribute
 If non-zero, specifies a maximum alignment to truncate alignment specified in the aligned attribute of a static variable to this value. More...
 

Additional Inherited Members

- Public Attributes inherited from clang::TransferrableTargetInfo
unsigned char PointerWidth
 
unsigned char PointerAlign
 
unsigned char BoolWidth
 
unsigned char BoolAlign
 
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 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 SuitableAlign
 
unsigned char DefaultAlignForAttributeAligned
 
unsigned char MinGlobalAlign
 
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 189 of file TargetInfo.h.

Member Enumeration Documentation

◆ 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

PNaClABIBuiltinVaList 

__builtin_va_list as defined by the PNaCl ABI: http://www.chromium.org/nativeclient/pnacl/bitcode-abi#TOC-Machine-Types

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 

Definition at line 265 of file TargetInfo.h.

◆ CallingConvCheckResult

Enumerator
CCCR_OK 
CCCR_Warning 
CCCR_Ignore 
CCCR_Error 

Definition at line 1458 of file TargetInfo.h.

◆ CallingConvKind

Enumerator
CCK_Default 
CCK_ClangABI4OrPS4 
CCK_MicrosoftWin64 

Definition at line 1478 of file TargetInfo.h.

Constructor & Destructor Documentation

◆ TargetInfo()

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

Definition at line 28 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, clang::TransferrableTargetInfo::HalfFormat, clang::TransferrableTargetInfo::HalfWidth, HasAArch64SVETypes, HasAlignMac68kSupport, HasBFloat16, HasBuiltinMSVaList, HasFloat128, HasFloat16, HasIbm128, HasLegalHalfType, HasRISCVVTypes, HasStrictFP, clang::TransferrableTargetInfo::Ibm128Align, clang::TransferrableTargetInfo::Ibm128Format, clang::TransferrableTargetInfo::Int16Type, clang::TransferrableTargetInfo::Int64Type, clang::TransferrableTargetInfo::IntAlign, clang::TransferrableTargetInfo::IntMaxType, clang::TransferrableTargetInfo::IntPtrType, clang::TransferrableTargetInfo::IntWidth, IsRenderScriptTarget, clang::TransferrableTargetInfo::LargeArrayAlign, clang::TransferrableTargetInfo::LargeArrayMinWidth, 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, 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, RealTypeUsesObjCFPRet, RegParmMax, clang::TargetCXXABI::set(), clang::TransferrableTargetInfo::ShortAccumAlign, clang::TransferrableTargetInfo::ShortAccumScale, clang::TransferrableTargetInfo::ShortAccumWidth, clang::TransferrableTargetInfo::ShortFractAlign, clang::TransferrableTargetInfo::ShortFractWidth, clang::TransferrableTargetInfo::SigAtomicType, clang::TransferrableTargetInfo::SignedInt, clang::TransferrableTargetInfo::SignedLong, clang::TransferrableTargetInfo::SignedLongLong, clang::TransferrableTargetInfo::SignedShort, SimdDefaultAlign, clang::TransferrableTargetInfo::SizeType, SSERegParmMax, clang::TransferrableTargetInfo::SuitableAlign, 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.

◆ ~TargetInfo()

TargetInfo::~TargetInfo ( )
virtual

Definition at line 154 of file TargetInfo.cpp.

Member Function Documentation

◆ adjust()

void TargetInfo::adjust ( DiagnosticsEngine Diags,
LangOptions Opts 
)
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::SPIRTargetInfo, clang::targets::AMDGPUTargetInfo, and clang::targets::PPCTargetInfo.

Definition at line 352 of file TargetInfo.cpp.

References checkArithmeticFenceSupported(), clang::TransferrableTargetInfo::DoubleAlign, clang::TransferrableTargetInfo::DoubleFormat, clang::TransferrableTargetInfo::DoubleWidth, clang::TransferrableTargetInfo::FloatAlign, clang::TransferrableTargetInfo::FloatFormat, clang::TransferrableTargetInfo::FloatWidth, getCharWidth(), getMaxPointerWidth(), clang::LangOptions::getOpenCLCompatibleVersion(), getSupportedOpenCLOpts(), clang::TransferrableTargetInfo::HalfAlign, clang::TransferrableTargetInfo::HalfFormat, clang::TransferrableTargetInfo::HalfWidth, hasFeatureEnabled(), clang::TransferrableTargetInfo::Int64Type, clang::TransferrableTargetInfo::IntAlign, clang::TransferrableTargetInfo::IntMaxType, clang::TransferrableTargetInfo::IntPtrType, clang::TransferrableTargetInfo::IntWidth, clang::TransferrableTargetInfo::LongAlign, clang::TransferrableTargetInfo::LongDoubleAlign, clang::TransferrableTargetInfo::LongDoubleFormat, clang::TransferrableTargetInfo::LongDoubleWidth, clang::TransferrableTargetInfo::LongLongAlign, clang::TransferrableTargetInfo::LongLongWidth, clang::TransferrableTargetInfo::LongWidth, clang::TransferrableTargetInfo::NewAlign, clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint, clang::TransferrableTargetInfo::PtrDiffType, clang::DiagnosticsEngine::Report(), clang::TransferrableTargetInfo::SignedChar, clang::TransferrableTargetInfo::SignedInt, clang::TransferrableTargetInfo::SignedLong, clang::TransferrableTargetInfo::SignedLongLong, clang::TransferrableTargetInfo::SignedShort, clang::TransferrableTargetInfo::SizeType, 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::PPCTargetInfo::adjust(), clang::targets::SPIRTargetInfo::adjust(), clang::CompilerInstance::createPreprocessor(), and clang::CompilerInstance::createTarget().

◆ adjustTargetOptions()

virtual void clang::TargetInfo::adjustTargetOptions ( const CodeGenOptions CGOpts,
TargetOptions TargetOpts 
) const
inlinevirtual

Adjust target options based on codegen options.

Definition at line 1187 of file TargetInfo.h.

Referenced by clang::CompilerInstance::createTarget().

◆ allowAMDGPUUnsafeFPAtomics()

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

Returns whether or not the AMDGPU unsafe floating point atomics are allowed.

Definition at line 920 of file TargetInfo.h.

References AllowAMDGPUUnsafeFPAtomics.

◆ 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 1578 of file TargetInfo.h.

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

◆ allowsLargerPreferedTypeAlignment()

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

Whether target allows to overalign ABI-specified preferred alignment.

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

Definition at line 1501 of file TargetInfo.h.

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

◆ checkArithmeticFenceSupported()

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

Controls if __arithmetic_fence is supported in the targeted backend.

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1447 of file TargetInfo.h.

Referenced by adjust().

◆ checkCallingConvention()

virtual CallingConvCheckResult clang::TargetInfo::checkCallingConvention ( CallingConv  CC) const
inlinevirtual

Determines whether a given calling convention is valid for the target.

A calling convention can either be accepted, produce a warning and be substituted with the default calling convention, or (someday) produce an error (such as using thiscall on a non-instance function).

Reimplemented in clang::targets::WindowsX86_64TargetInfo, clang::targets::X86_64TargetInfo, clang::targets::MCUX86_32TargetInfo, clang::targets::PPC64TargetInfo, clang::targets::AMDGPUTargetInfo, clang::targets::X86TargetInfo, clang::targets::WindowsARMTargetInfo, clang::targets::ARMTargetInfo, clang::targets::WindowsARM64TargetInfo, clang::targets::NVPTXTargetInfo, clang::targets::SystemZTargetInfo, clang::targets::SPIRTargetInfo, clang::targets::AArch64TargetInfo, clang::targets::BPFTargetInfo, and clang::targets::VETargetInfo.

Definition at line 1469 of file TargetInfo.h.

References clang::CC_C, CCCR_OK, and CCCR_Warning.

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

◆ checkCFProtectionBranchSupported()

bool TargetInfo::checkCFProtectionBranchSupported ( DiagnosticsEngine Diags) const
virtual

Check if the target supports CFProtection branch.

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 162 of file TargetInfo.cpp.

References clang::DiagnosticsEngine::Report().

Referenced by clang::CodeGen::CodeGenModule::Release().

◆ checkCFProtectionReturnSupported()

bool TargetInfo::checkCFProtectionReturnSupported ( DiagnosticsEngine Diags) const
virtual

Check if the target supports CFProtection branch.

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 168 of file TargetInfo.cpp.

References clang::DiagnosticsEngine::Report().

Referenced by clang::CodeGen::CodeGenModule::Release().

◆ convertConstraint()

virtual std::string clang::TargetInfo::convertConstraint ( const char *&  Constraint) const
inlinevirtual

◆ copyAuxTarget()

void TargetInfo::copyAuxTarget ( const TargetInfo Aux)
protected

Copy type and layout related info.

Definition at line 875 of file TargetInfo.cpp.

References clang::Target.

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

◆ CPUSpecificManglingCharacter()

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

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1336 of file TargetInfo.h.

◆ CreateTargetInfo()

TargetInfo * TargetInfo::CreateTargetInfo ( DiagnosticsEngine Diags,
const std::shared_ptr< 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.

Definition at line 656 of file Targets.cpp.

References clang::targets::AllocateTarget(), clang::DiagnosticsEngine::Report(), and clang::Target.

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.

Definition at line 1504 of file TargetInfo.h.

Referenced by clang::ASTContext::DumpRecordLayout(), and clang::ASTContext::getPreferredTypeAlign().

◆ 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 382 of file TargetInfo.h.

References clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint.

◆ fillValidCPUList()

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

◆ 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::X86TargetInfo, clang::targets::RISCV64TargetInfo, and clang::targets::RISCV32TargetInfo.

Definition at line 1217 of file TargetInfo.h.

References fillValidCPUList().

◆ getABI()

virtual StringRef clang::TargetInfo::getABI ( ) const
inlinevirtual

◆ getAccumAlign()

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

Definition at line 472 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 503 of file TargetInfo.h.

References clang::TransferrableTargetInfo::AccumScale.

◆ 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 471 of file TargetInfo.h.

References clang::TransferrableTargetInfo::AccumWidth.

◆ getAddressSpaceMap()

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

Definition at line 1404 of file TargetInfo.h.

References AddrSpaceMap.

Referenced by getAddressSpaceMap().

◆ 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 924 of file TargetInfo.h.

References ARMCDECoprocMask.

◆ getBFloat16Align()

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

Definition at line 657 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::ARMTargetInfo, and clang::targets::AArch64TargetInfo.

Definition at line 699 of file TargetInfo.h.

◆ getBFloat16Width()

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

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

Definition at line 656 of file TargetInfo.h.

References clang::TransferrableTargetInfo::BFloat16Width.

◆ getBoolAlign()

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

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

Definition at line 436 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 433 of file TargetInfo.h.

References clang::TransferrableTargetInfo::BoolWidth.

◆ getBuiltinVaListKind()

virtual BuiltinVaListKind clang::TargetInfo::getBuiltinVaListKind ( ) const
pure virtual

◆ getCallingConvKind()

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

◆ getChar16Align()

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

Definition at line 638 of file TargetInfo.h.

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

◆ getChar16Type()

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

Definition at line 348 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Char16Type.

◆ getChar16Width()

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

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

Definition at line 637 of file TargetInfo.h.

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

Referenced by EvaluateValue().

◆ getChar32Align()

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

Definition at line 643 of file TargetInfo.h.

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

◆ getChar32Type()

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

Definition at line 349 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Char32Type.

◆ getChar32Width()

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

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

Definition at line 642 of file TargetInfo.h.

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

Referenced by EvaluateValue().

◆ getCharAlign()

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

◆ getCharWidth()

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

◆ getClobbers()

virtual const char* clang::TargetInfo::getClobbers ( ) const
pure virtual

◆ getConstantAddressSpace()

virtual llvm::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 None, and such optimizations will be disabled.

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 1422 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::X86TargetInfo, clang::targets::ARMTargetInfo, clang::targets::AArch64TargetInfo, and clang::targets::RISCVTargetInfo.

Definition at line 954 of file TargetInfo.h.

◆ getCorrespondingUnsignedType()

static IntType clang::TargetInfo::getCorrespondingUnsignedType ( IntType  T)
inlinestatic

◆ getCPUCacheLineSize()

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

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1352 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 1344 of file TargetInfo.h.

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

◆ 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 1414 of file TargetInfo.h.

References clang::getLangASFromTargetAS().

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

◆ getCXXABI()

TargetCXXABI clang::TargetInfo::getCXXABI ( ) const
inline

Get the C++ ABI currently in use.

Definition at line 1202 of file TargetInfo.h.

References TheCXXABI.

Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::AddImplicitlyDeclaredMembersToClass(), clang::Sema::AddInitializerToDecl(), clang::Sema::adjustMemberFunctionCC(), ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), basicGVALinkageForFunction(), basicGVALinkageForVariable(), BuildAppleKextVirtualCall(), clang::Sema::BuildArrayType(), canEmitDelegateCallArgs(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCompleteDestructorVariant(), clang::Sema::CheckCXXThrowOperand(), computeKeyFunction(), clang::ASTContext::createDeviceMangleContext(), clang::ASTContext::createMangleContext(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DefineUsedVTables(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CGCXXABI::EmitCtorCompleteObjectHandler(), clang::CodeGen::CodeGenFunction::EmitCtorPrologue(), clang::CodeGen::CodeGenFunction::EmitEndEHSpec(), clang::CodeGen::CodeGenFunction::EmitInheritedCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), clang::Sema::FixOverloadedFunctionReference(), clang::ASTNameGenerator::Implementation::getAllManglings(), getCallingConvKind(), getCallingConvMangling(), getConstantArrayInfoInChars(), clang::ASTContext::getCXXABIKind(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), clang::ASTContext::getVTableContext(), hasInAllocaArgs(), clang::CodeGen::CodeGenTypes::inheritingCtorHasParams(), InitDeviceMC(), clang::Sema::InstantiateDefaultCtorDefaultArgs(), clang::Type::isIncompleteType(), clang::FunctionDecl::isMSExternInline(), isMsLayout(), clang::ASTContext::isMSStaticDataMemberInlineDefinition(), isVarDeclStrongDefinition(), clang::CodeGen::CodeGenVTables::isVTableExternal(), clang::MangleContext::mangleName(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MarkFunctionReferenced(), clang::Sema::MarkVTableUsed(), clang::Sema::PerformImplicitConversion(), shouldEmitVTableThunk(), TryReinterpretCast(), TryStaticMemberPointerUpcast(), and clang::Sema::VerifyBitField().

◆ getDataLayoutString()

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

Definition at line 1136 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 613 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 and declaration context.

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

Definition at line 1451 of file TargetInfo.h.

References clang::CC_C.

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

◆ getDoubleAlign()

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

Definition at line 662 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 661 of file TargetInfo.h.

References clang::TransferrableTargetInfo::DoubleWidth.

Referenced by getRealTypeByWidth().

◆ getDWARFAddressSpace()

virtual 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 None and no conversion will be emitted in the DWARF.

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

Definition at line 1555 of file TargetInfo.h.

◆ getEHDataRegisterNumber()

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

Return the register number that __builtin_eh_return_regno would return with the specified argument.

This corresponds with TargetLowering's getExceptionPointerRegister and getExceptionSelectorRegister in the backend.

Reimplemented in clang::targets::X86_64TargetInfo, clang::targets::X86_32TargetInfo, clang::targets::MipsTargetInfo, clang::targets::PPCTargetInfo, clang::targets::ARMTargetInfo, clang::targets::SystemZTargetInfo, clang::targets::AArch64TargetInfo, clang::targets::HexagonTargetInfo, clang::targets::RISCVTargetInfo, clang::targets::XCoreTargetInfo, and clang::targets::SparcTargetInfo.

Definition at line 1395 of file TargetInfo.h.

◆ 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.

Definition at line 742 of file TargetInfo.h.

References getDefaultAlignForAttributeAligned().

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

◆ getFloat128Align()

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

Definition at line 676 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 691 of file TargetInfo.h.

◆ getFloat128Width()

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

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

Definition at line 675 of file TargetInfo.h.

◆ getFloatAlign()

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

Definition at line 652 of file TargetInfo.h.

References clang::TransferrableTargetInfo::FloatAlign.

◆ getFloatEvalMethod()

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

Return the value for the C99 FLT_EVAL_METHOD macro.

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

Definition at line 704 of file TargetInfo.h.

◆ 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 651 of file TargetInfo.h.

References clang::TransferrableTargetInfo::FloatWidth.

Referenced by getRealTypeByWidth().

◆ getFractAlign()

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

Definition at line 487 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 551 of file TargetInfo.h.

References clang::TransferrableTargetInfo::FractWidth.

Referenced by getUnsignedFractScale().

◆ 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 486 of file TargetInfo.h.

References clang::TransferrableTargetInfo::FractWidth.

◆ getGCCAddlRegNames()

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

◆ getGCCRegAliases()

virtual ArrayRef<GCCRegAlias> clang::TargetInfo::getGCCRegAliases ( ) const
protectedpure virtual

◆ getGCCRegNames()

virtual ArrayRef<const char *> clang::TargetInfo::getGCCRegNames ( ) const
protectedpure virtual

◆ getGridValue()

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

◆ getHalfAlign()

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

Definition at line 647 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 646 of file TargetInfo.h.

References clang::TransferrableTargetInfo::HalfWidth.

◆ getIbm128Align()

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

Definition at line 684 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Ibm128Align.

◆ getIbm128Format()

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

◆ getIbm128Mangling()

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

Return the mangled code of __ibm128.

Reimplemented in clang::targets::PPCTargetInfo.

Definition at line 694 of file TargetInfo.h.

◆ getIbm128Width()

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

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

Definition at line 683 of file TargetInfo.h.

◆ getInt16Type()

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

Definition at line 354 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Int16Type.

◆ getInt64Type()

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

Definition at line 350 of file TargetInfo.h.

References clang::TransferrableTargetInfo::Int64Type.

Referenced by DecodeTypeFromStr().

◆ getIntAlign()

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

Definition at line 452 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 755 of file TargetInfo.h.

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

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

◆ getIntMaxType()

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

◆ getIntPtrType()

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

◆ getIntTypeByWidth()

TargetInfo::IntType TargetInfo::getIntTypeByWidth ( unsigned  BitWidth,
bool  IsSigned 
) const
virtual

◆ getIntWidth()

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

◆ getLargeArrayAlign()

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

◆ getLargeArrayMinWidth()

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

◆ getLeastIntTypeByWidth()

TargetInfo::IntType TargetInfo::getLeastIntTypeByWidth ( unsigned  BitWidth,
bool  IsSigned 
) const
virtual

◆ getLongAccumAlign()

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

Definition at line 477 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 508 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongAccumScale.

◆ 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 476 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongAccumWidth.

◆ getLongAlign()

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

Definition at line 457 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongAlign.

Referenced by getTypeAlign().

◆ getLongDoubleAlign()

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

Definition at line 668 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongDoubleAlign.

◆ getLongDoubleFormat()

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

◆ 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 688 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 667 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongDoubleWidth.

◆ getLongFractAlign()

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

Definition at line 492 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 555 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongFractWidth.

Referenced by getUnsignedLongFractScale().

◆ 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 491 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongFractWidth.

◆ getLongLongAlign()

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

Definition at line 462 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 461 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongLongWidth.

Referenced by clang::Sema::ActOnGNUNullExpr(), clang::Sema::ActOnNumericConstant(), getIntTypeByWidth(), getLeastIntTypeByWidth(), and getTypeWidth().

◆ 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 456 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongWidth.

Referenced by clang::Sema::ActOnGNUNullExpr(), clang::Sema::ActOnNumericConstant(), DecodeTypeFromStr(), getIntTypeByWidth(), getLeastIntTypeByWidth(), and getTypeWidth().

◆ getMaxAlignedAttribute()

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

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

Definition at line 819 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 716 of file TargetInfo.h.

References MaxAtomicInlineWidth.

Referenced by clang::ASTContext::AtomicUsesUnsupportedLibcall(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), and hasBuiltinAtomic().

◆ 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 713 of file TargetInfo.h.

References MaxAtomicPromoteWidth.

◆ getMaxOpenCLWorkGroupSize()

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

Definition at line 737 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 424 of file TargetInfo.h.

References clang::TransferrableTargetInfo::PointerWidth.

Referenced by adjust(), clang::ASTContext::getConstantArrayType(), 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 1369 of file TargetInfo.h.

References clang::TransferrableTargetInfo::MaxTLSAlign.

Referenced by clang::Sema::AddAlignedAttr(), and clang::Sema::FinalizeDeclaration().

◆ getMaxVectorAlign()

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

Return the maximum vector alignment supported for the given target.

Definition at line 731 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 777 of file TargetInfo.h.

References MCountName.

◆ getMinGlobalAlign()

virtual unsigned clang::TargetInfo::getMinGlobalAlign ( uint64_t  ) const
inlinevirtual

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

Reimplemented in clang::targets::MicrosoftARM64TargetInfo.

Definition at line 619 of file TargetInfo.h.

References clang::TransferrableTargetInfo::MinGlobalAlign.

Referenced by clang::targets::MicrosoftARM64TargetInfo::getMinGlobalAlign().

◆ getNewAlign()

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

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

Definition at line 626 of file TargetInfo.h.

References clang::TransferrableTargetInfo::LongDoubleAlign, clang::TransferrableTargetInfo::LongLongAlign, max(), and clang::TransferrableTargetInfo::NewAlign.

Referenced by clang::Sema::AddKnownFunctionAttributes(), and clang::CodeGen::CodeGenFunction::EmitCXXNewExpr().

◆ 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 560 of file TargetInfo.cpp.

Referenced by AddVariableConstraints().

◆ 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 430 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 1408 of file TargetInfo.h.

References clang::getLangASFromTargetAS().

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

◆ getOpenCLTypeAddrSpace()

LangAS TargetInfo::getOpenCLTypeAddrSpace ( OpenCLTypeKind  TK) const
virtual

Get address space for OpenCL type.

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 480 of file TargetInfo.cpp.

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

◆ 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 1438 of file TargetInfo.h.

References PlatformMinVersion.

Referenced by CheckAvailability(), and checkObjCMethodX86VectorTypes().

◆ getPlatformName()

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

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

Definition at line 1434 of file TargetInfo.h.

References PlatformName.

Referenced by clang::Sema::ActOnObjCAvailabilityCheckExpr(), CheckAvailability(), getAttrForPlatform(), and clang::Decl::getVersionIntroduced().

◆ getPointerAlign()

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

◆ getPointerAlignV()

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

◆ getPointerWidth()

uint64_t clang::TargetInfo::getPointerWidth ( unsigned  AddrSpace) const
inline

◆ getPointerWidthV()

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

◆ getProcessIDType()

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

◆ getPtrDiffType()

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

◆ getPtrDiffTypeV()

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

Definition at line 1589 of file TargetInfo.h.

References clang::TransferrableTargetInfo::PtrDiffType.

Referenced by getPtrDiffType().

◆ getRealTypeByWidth()

TargetInfo::RealType TargetInfo::getRealTypeByWidth ( unsigned  BitWidth,
bool  ExplicitIEEE 
) 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 282 of file TargetInfo.cpp.

References clang::TransferrableTargetInfo::Double, clang::TransferrableTargetInfo::Float, clang::TransferrableTargetInfo::Float128, getDoubleWidth(), getFloatWidth(), getLongDoubleFormat(), hasFloat128Type(), clang::TransferrableTargetInfo::LongDouble, and clang::TransferrableTargetInfo::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 763 of file TargetInfo.h.

References clang::TransferrableTargetInfo::PointerWidth.

◆ getRegParmMax()

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

Definition at line 1355 of file TargetInfo.h.

References RegParmMax.

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

◆ 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 1561 of file TargetInfo.h.

References getTargetOpts(), and clang::TargetOptions::SDKVersion.

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

◆ getShortAccumAlign()

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

Definition at line 467 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 496 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortAccumScale.

◆ 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 466 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortAccumWidth.

◆ getShortAlign()

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

Return the alignment of 'signed short' and 'unsigned short' for this target.

Definition at line 447 of file TargetInfo.h.

Referenced by getTypeAlign().

◆ getShortFractAlign()

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

Definition at line 482 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 547 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortFractWidth.

Referenced by getUnsignedShortFractScale().

◆ 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 481 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ShortFractWidth.

◆ getShortWidth()

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

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

Definition at line 443 of file TargetInfo.h.

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

◆ getSigAtomicType()

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

Definition at line 358 of file TargetInfo.h.

References clang::TransferrableTargetInfo::SigAtomicType.

◆ getSignedSizeType()

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

◆ getSimdDefaultAlign()

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

Return default simd alignment for the given target.

Generally, this value is type-specific, but this alignment can be used for most of the types for the given target.

Definition at line 735 of file TargetInfo.h.

References SimdDefaultAlign.

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

◆ getSizeType()

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

◆ getStaticInitSectionSpecifier()

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

Return the section to use for C++ static initialization functions.

Definition at line 1400 of file TargetInfo.h.

◆ 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 609 of file TargetInfo.h.

References clang::TransferrableTargetInfo::SuitableAlign.

◆ getSupportedOpenCLOpts() [1/2]

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

◆ getSupportedOpenCLOpts() [2/2]

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

Get const supported OpenCL extensions and optional core features.

Definition at line 1537 of file TargetInfo.h.

References getTargetOpts(), and clang::TargetOptions::OpenCLFeaturesMap.

◆ getTargetBuiltins()

virtual ArrayRef<Builtin::Info> clang::TargetInfo::getTargetBuiltins ( ) const
pure virtual

◆ 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::CygwinX86_64TargetInfo, clang::targets::MicrosoftX86_64TargetInfo, clang::targets::RTEMSX86_32TargetInfo, clang::targets::MCUX86_32TargetInfo, clang::targets::HaikuX86_32TargetInfo, clang::targets::CygwinX86_32TargetInfo, clang::targets::MinGWX86_32TargetInfo, clang::targets::MicrosoftX86_32TargetInfo, clang::targets::X86TargetInfo, clang::targets::RenderScript32TargetInfo, clang::targets::CygwinARMTargetInfo, clang::targets::AMDGPUTargetInfo, clang::targets::MinGWARMTargetInfo, clang::targets::MicrosoftARMleTargetInfo, clang::targets::ItaniumWindowsARMleTargetInfo, clang::targets::RenderScript64TargetInfo, clang::targets::SparcV9TargetInfo, clang::targets::ARMbeTargetInfo, clang::targets::AArch64beTargetInfo, clang::targets::ARMleTargetInfo, clang::targets::MipsTargetInfo, clang::targets::SPIR64TargetInfo, clang::targets::WebAssembly64TargetInfo, clang::targets::MicrosoftARM64TargetInfo, clang::targets::PPCTargetInfo, clang::targets::SparcV8TargetInfo, clang::targets::SPIR32TargetInfo, clang::targets::ARMTargetInfo, clang::targets::WebAssembly32TargetInfo, clang::targets::AArch64leTargetInfo, clang::targets::TCELETargetInfo, clang::targets::AArch64TargetInfo, clang::targets::HexagonTargetInfo, clang::targets::SPIRTargetInfo, clang::targets::TCETargetInfo, clang::targets::RISCVTargetInfo, clang::targets::NVPTXTargetInfo, clang::targets::WebAssemblyTargetInfo, clang::targets::SystemZTargetInfo, clang::targets::LanaiTargetInfo, clang::targets::AVRTargetInfo, clang::targets::VETargetInfo, clang::targets::MSP430TargetInfo, clang::targets::BPFTargetInfo, clang::targets::SparcTargetInfo, clang::targets::PNaClTargetInfo, clang::targets::XCoreTargetInfo, clang::targets::M68kTargetInfo, clang::targets::ARCTargetInfo, clang::targets::Le64TargetInfo, clang::targets::OSTargetInfo< PPC32TargetInfo >, clang::targets::OSTargetInfo< X86_64TargetInfo >, clang::targets::OSTargetInfo< PPC64TargetInfo >, clang::targets::OSTargetInfo< ARMleTargetInfo >, clang::targets::OSTargetInfo< AArch64leTargetInfo >, and clang::targets::OSTargetInfo< X86_32TargetInfo >.

◆ getTargetID()

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

Returns the target ID if supported.

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 1134 of file TargetInfo.h.

◆ getTargetOpts()

TargetOptions& clang::TargetInfo::getTargetOpts ( ) const
inline

◆ getTriple()

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

Returns the target triple of the primary target.

Definition at line 1129 of file TargetInfo.h.

Referenced by clang::targets::AArch64TargetInfo::AArch64TargetInfo(), clang::Sema::AddAlignedAttr(), clang::Sema::AddKnownFunctionAttributes(), addLinkOptionsPostorder(), clang::targets::AMDGPUTargetInfo::adjust(), clang::targets::AMDGPUTargetInfo::AMDGPUTargetInfo(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), clang::ASTContext::AtomicUsesUnsupportedLibcall(), clang::Sema::BuildCXXThrow(), buildGlobalBlock(), clang::Sema::BuildVAArgExpr(), clang::arcmt::trans::canApplyWeak(), clang::Sema::CheckCallingConvAttr(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::checkDeviceDecl(), clang::Sema::CheckEnumConstant(), checkObjCMethodX86VectorTypes(), clang::Sema::CheckVariableDeclarationType(), configureBlocksRuntimeObject(), clang::CodeGen::CreateItaniumCXXABI(), clang::CompilerInstance::createTarget(), clang::targets::DarwinAArch64TargetInfo::DarwinAArch64TargetInfo(), clang::Sema::diagnoseUnavailableAlignedAllocation(), EmitBitTestIntrinsic(), clang::CodeGen::CodeGenFunction::EmitBuiltinAvailable(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), emitGlobalDtorWithCXAAtExit(), emitIsPlatformVersionAtLeast(), emitOptimizedARCReturnCall(), clang::CodeGen::CodeGenFunction::EmitSEHExceptionCodeSave(), clang::Interpreter::Execute(), clang::targets::AMDGPUTargetInfo::fillValidCPUList(), clang::targets::X86TargetInfo::fillValidCPUList(), clang::CodeGen::EHPersonality::get(), clang::analyze_scanf::ScanfSpecifier::getArgType(), clang::FunctionDecl::getBuiltinID(), clang::targets::ARMTargetInfo::getBuiltinVaListKind(), getCallingConvKind(), getCallingConvMangling(), getCodegenToUse(), getInstrProfSection(), clang::ASTContext::getNSIntegerType(), clang::ASTContext::getNSUIntegerType(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), getTypeInfoLinkage(), clang::targets::RISCVTargetInfo::hasFeature(), clang::targets::X86TargetInfo::hasFeature(), hasPS4DLLImportExport(), clang::targets::RISCVTargetInfo::initFeatureMap(), clang::targets::ARMTargetInfo::initFeatureMap(), clang::targets::AMDGPUTargetInfo::initFeatureMap(), clang::targets::X86TargetInfo::initFeatureMap(), clang::Sema::Initialize(), clang::Sema::InstantiateClassMembers(), isAIXLayout(), clang::CodeGen::ABIInfo::isAndroid(), isArc4RandomAvailable(), clang::FunctionDecl::isMSVCRTEntryPoint(), isSEHTrySupported(), isTargetArch(), isTargetEnvironment(), isTargetOS(), isTargetVendor(), isThreadWrapperReplaceable(), clang::Sema::isValidSectionSpecifier(), isVarDeclStrongDefinition(), clang::CodeGen::CodeGenModule::Release(), shouldDiagnoseAvailabilityByDefault(), shouldDLLImportComdatSymbols(), supportsIFunc(), supportsMultiVersioning(), and clang::targets::MipsTargetInfo::validateTarget().

◆ getTypeAlign()

unsigned TargetInfo::getTypeAlign ( IntType  T) const

◆ getTypeConstantSuffix()

const char * TargetInfo::getTypeConstantSuffix ( IntType  T) const

◆ getTypeFormatModifier()

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

◆ getTypeName()

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

◆ getTypeWidth()

unsigned TargetInfo::getTypeWidth ( IntType  T) const

◆ 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 526 of file TargetInfo.h.

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

Referenced by getUnsignedAccumIBits().

◆ getUnsignedFractScale()

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

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

Definition at line 566 of file TargetInfo.h.

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

◆ getUnsignedLongAccumIBits()

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

◆ 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 536 of file TargetInfo.h.

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

Referenced by getUnsignedLongAccumIBits().

◆ getUnsignedLongFractScale()

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

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

Definition at line 572 of file TargetInfo.h.

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

◆ getUnsignedPtrDiffType()

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

◆ getUnsignedShortAccumIBits()

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

◆ 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 515 of file TargetInfo.h.

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

Referenced by getUnsignedShortAccumIBits().

◆ getUnsignedShortFractScale()

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

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

Definition at line 559 of file TargetInfo.h.

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

◆ getUnwindWordWidth()

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

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

Definition at line 760 of file TargetInfo.h.

References getPointerWidth().

◆ 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 774 of file TargetInfo.h.

References UserLabelPrefix.

Referenced by clang::MangleContext::mangleName().

◆ getVScaleRange()

virtual Optional<std::pair<unsigned, unsigned> > clang::TargetInfo::getVScaleRange ( const LangOptions LangOpts) const
inlinevirtual

Returns target-specific min and max values VScale_Range.

Reimplemented in clang::targets::AArch64TargetInfo.

Definition at line 889 of file TargetInfo.h.

Referenced by clang::CodeGen::CodeGenFunction::FinishFunction().

◆ getVtblPtrAddressSpace()

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

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 1545 of file TargetInfo.h.

◆ getWCharAlign()

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

Definition at line 633 of file TargetInfo.h.

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

◆ getWCharType()

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

Definition at line 346 of file TargetInfo.h.

References clang::TransferrableTargetInfo::WCharType.

Referenced by EvaluateValue().

◆ getWCharWidth()

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

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

Definition at line 632 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 347 of file TargetInfo.h.

References clang::TransferrableTargetInfo::WIntType.

◆ 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 813 of file TargetInfo.h.

References clang::TransferrableTargetInfo::ZeroLengthBitfieldBoundary.

◆ handleAsmEscapedChar()

virtual llvm::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::M68kTargetInfo.

Definition at line 1115 of file TargetInfo.h.

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::DarwinX86_64TargetInfo, clang::targets::DarwinI386TargetInfo, clang::targets::AMDGPUTargetInfo, clang::targets::MipsTargetInfo, clang::targets::X86TargetInfo, clang::targets::PPCTargetInfo, clang::targets::ARMTargetInfo, clang::targets::SystemZTargetInfo, clang::targets::RISCVTargetInfo, clang::targets::AArch64TargetInfo, clang::targets::HexagonTargetInfo, clang::targets::BPFTargetInfo, and clang::targets::SparcTargetInfo.

Definition at line 1298 of file TargetInfo.h.

◆ hasAArch64SVETypes()

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

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

Definition at line 912 of file TargetInfo.h.

References HasAArch64SVETypes.

Referenced by clang::ASTContext::getScalableVectorType(), and clang::Sema::Initialize().

◆ hasAlignMac68kSupport()

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

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

Definition at line 828 of file TargetInfo.h.

References HasAlignMac68kSupport.

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

◆ hasBFloat16Type()

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

Determine whether the _BFloat16 type is supported on this target.

Reimplemented in clang::targets::ARMTargetInfo.

Definition at line 598 of file TargetInfo.h.

References HasBFloat16.

◆ 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 722 of file TargetInfo.h.

References getCharWidth(), and getMaxAtomicInlineWidth().

Referenced by emitOMPAtomicRMW().

◆ 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 905 of file TargetInfo.h.

References HasBuiltinMSVaList.

Referenced by clang::Sema::BuildVAArgExpr(), and clang::Sema::Initialize().

◆ hasExtIntType()

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

◆ hasFeature()

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

◆ 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 592 of file TargetInfo.h.

References HasFloat128.

Referenced by clang::Sema::checkDeviceDecl(), getRealTypeByWidth(), and clang::targets::AMDGPUTargetInfo::setAuxTarget().

◆ hasFloat16Type()

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

Determine whether the _Float16 type is supported on this target.

Definition at line 595 of file TargetInfo.h.

References HasFloat16.

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

◆ hasIbm128Type()

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

Determine whether the __ibm128 type is supported on this target.

Definition at line 601 of file TargetInfo.h.

References HasIbm128.

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

◆ hasInt128Type()

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

◆ hasLegalHalfType()

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

Determine whether _Float16 is supported on this target.

Definition at line 589 of file TargetInfo.h.

References HasLegalHalfType.

◆ 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 1387 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::Le64TargetInfo.

Definition at line 1161 of file TargetInfo.h.

◆ hasPS4DLLImportExport()

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

Definition at line 1171 of file TargetInfo.h.

References getTriple().

Referenced by computeKeyFunction(), and 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 916 of file TargetInfo.h.

References HasRISCVVTypes.

Referenced by clang::ASTContext::getScalableVectorType(), and clang::Sema::Initialize().

◆ 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::X86TargetInfo, clang::targets::PPCTargetInfo, clang::targets::ARMTargetInfo, clang::targets::SparcV8TargetInfo, clang::targets::VETargetInfo, and clang::targets::SparcTargetInfo.

Definition at line 1488 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 604 of file TargetInfo.h.

References HasStrictFP.

◆ initFeatureMap()

bool TargetInfo::initFeatureMap ( llvm::StringMap< bool > &  Features,
DiagnosticsEngine Diags,
StringRef  CPU,
const std::vector< std::string > &  FeatureVec 
) const
virtual

◆ isBigEndian()

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

Definition at line 1440 of file TargetInfo.h.

References BigEndian.

Referenced by EmitSignBit().

◆ 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::MipsTargetInfo, clang::targets::PPCTargetInfo, clang::targets::ARMTargetInfo, clang::targets::AArch64TargetInfo, clang::targets::HexagonTargetInfo, and clang::targets::ARCTargetInfo.

Definition at line 897 of file TargetInfo.h.

◆ isLittleEndian()

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

Definition at line 1441 of file TargetInfo.h.

References BigEndian.

◆ 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 1124 of file TargetInfo.h.

◆ isRenderScriptTarget()

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

Returns true for RenderScript.

Definition at line 908 of file TargetInfo.h.

References IsRenderScriptTarget.

◆ isSEHTrySupported()

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

Whether the target supports SEH __try.

Definition at line 1375 of file TargetInfo.h.

References getTriple().

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

◆ isSPRegName()

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

◆ isTLSSupported()

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

◆ isTypeSigned()

bool TargetInfo::isTypeSigned ( IntType  T)
static

◆ 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 507 of file TargetInfo.cpp.

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

◆ isValidCPUName()

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

◆ isValidFeatureName()

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

Determine whether this TargetInfo supports the given feature.

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

Definition at line 1266 of file TargetInfo.h.

Referenced by clang::Sema::checkTargetAttr(), and clang::TargetOMPContext::TargetOMPContext().

◆ 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 515 of file TargetInfo.cpp.

Referenced by AddVariableConstraints().

◆ isValidTuneCPUName()

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

brief Determine whether this TargetInfo supports the given CPU name for

Reimplemented in clang::targets::X86TargetInfo, clang::targets::RISCV64TargetInfo, and clang::targets::RISCV32TargetInfo.

Definition at line 1228 of file TargetInfo.h.

◆ isVLASupported()

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

Whether target supports variable-length arrays.

Definition at line 1372 of file TargetInfo.h.

References VLASupported.

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

◆ multiVersionSortPriority()

virtual unsigned clang::TargetInfo::multiVersionSortPriority ( StringRef  Name) const
inlinevirtual

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1321 of file TargetInfo.h.

Referenced by TargetMVPriority().

◆ noSignedCharForObjCBool()

void clang::TargetInfo::noSignedCharForObjCBool ( )
inline

◆ resetDataLayout()

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

◆ resolveSymbolicName()

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

Definition at line 675 of file TargetInfo.cpp.

◆ setABI()

virtual bool clang::TargetInfo::setABI ( const std::string Name)
inlinevirtual

◆ setAuxTarget()

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

Reimplemented in clang::targets::AMDGPUTargetInfo.

Definition at line 1575 of file TargetInfo.h.

Referenced by clang::CompilerInstance::createTarget().

◆ setCommandLineOpenCLOpts()

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

Set supported OpenCL extensions as written on command line.

Definition at line 1516 of file TargetInfo.h.

References getTargetOpts(), and string().

◆ setCPU()

virtual bool clang::TargetInfo::setCPU ( const std::string Name)
inlinevirtual

◆ 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::PPCTargetInfo, clang::targets::BPFTargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1259 of file TargetInfo.h.

◆ 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::X86TargetInfo, and clang::targets::ARMTargetInfo.

Definition at line 1247 of file TargetInfo.h.

◆ setMaxAtomicWidth()

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

Set the maximum inline or promote width lock-free atomic operation for the given target.

Reimplemented in clang::targets::X86_64TargetInfo, clang::targets::X86_32TargetInfo, clang::targets::RISCV64TargetInfo, and clang::targets::RISCV32TargetInfo.

Definition at line 719 of file TargetInfo.h.

◆ setSupportedOpenCLOpts()

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

Set supported OpenCL extensions and optional core features.

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

Definition at line 1507 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 1165 of file TargetInfo.h.

References getTriple().

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

◆ supportAllOpenCLOpts()

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

Definition at line 1509 of file TargetInfo.h.

◆ 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 1444 of file TargetInfo.h.

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

◆ supportsIFunc()

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

Identify whether this target supports IFuncs.

Definition at line 1313 of file TargetInfo.h.

References getTriple().

Referenced by AppendCPUSpecificCPUDispatchMangling().

◆ 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 1310 of file TargetInfo.h.

References getTriple().

◆ supportsTargetAttributeTune()

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

brief Determine whether this TargetInfo supports tune in target attribute.

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1233 of file TargetInfo.h.

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

◆ 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 870 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 795 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 823 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::X86TargetInfo, clang::targets::AMDGPUTargetInfo, clang::targets::ARMTargetInfo, clang::targets::SPIRTargetInfo, and clang::targets::AArch64TargetInfo.

Definition at line 864 of file TargetInfo.h.

Referenced by clang::CodeGen::CodeGenTypes::ConvertType(), needsConversionOfHalfVec(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().

◆ useLeadingZeroLengthBitfield()

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

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

Definition at line 807 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 856 of file TargetInfo.h.

References ComplexLongDoubleUsesFP2Ret.

Referenced by clang::CodeGen::CodeGenModule::ReturnTypeUsesFP2Ret().

◆ useObjCFPRetForRealType()

bool clang::TargetInfo::useObjCFPRetForRealType ( RealType  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 850 of file TargetInfo.h.

References RealTypeUsesObjCFPRet.

Referenced by clang::CodeGen::CodeGenModule::ReturnTypeUsesFPRet().

◆ 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 786 of file TargetInfo.h.

References clang::TransferrableTargetInfo::UseSignedCharForObjCBool.

◆ useZeroLengthBitfieldAlignment()

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

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

Definition at line 801 of file TargetInfo.h.

References clang::TransferrableTargetInfo::UseZeroLengthBitfieldAlignment.

◆ validateAsmConstraint()

virtual bool clang::TargetInfo::validateAsmConstraint ( const char *&  Name,
TargetInfo::ConstraintInfo info 
) const
pure virtual

◆ validateBranchProtection()

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

Determine if this TargetInfo supports the given branch protection specification.

Reimplemented in clang::targets::AArch64TargetInfo.

Definition at line 1280 of file TargetInfo.h.

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

◆ validateConstraintModifier()

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

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

Definition at line 1089 of file TargetInfo.h.

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

◆ validateCpuIs()

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

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1327 of file TargetInfo.h.

◆ validateCPUSpecificCPUDispatch()

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

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1331 of file TargetInfo.h.

◆ validateCpuSupports()

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

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1317 of file TargetInfo.h.

◆ 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::X86_64TargetInfo, and clang::targets::X86TargetInfo.

Definition at line 1063 of file TargetInfo.h.

◆ validateInputConstraint()

bool TargetInfo::validateInputConstraint ( MutableArrayRef< ConstraintInfo OutputConstraints,
ConstraintInfo info 
) const

Definition at line 698 of file TargetInfo.cpp.

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

◆ validateInputSize()

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

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1083 of file TargetInfo.h.

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

◆ 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 731 of file Targets.cpp.

◆ validateOutputConstraint()

bool TargetInfo::validateOutputConstraint ( ConstraintInfo Info) const

Definition at line 601 of file TargetInfo.cpp.

Referenced by clang::Sema::ActOnGCCAsmStmt(), and AddVariableConstraints().

◆ validateOutputSize()

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

Reimplemented in clang::targets::X86TargetInfo.

Definition at line 1077 of file TargetInfo.h.

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

◆ validateTarget()

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

Check the target is valid after it is fully initialized.

Reimplemented in clang::targets::MipsTargetInfo.

Definition at line 1566 of file TargetInfo.h.

Member Data Documentation

◆ AddrSpaceMap

const LangASMap* clang::TargetInfo::AddrSpaceMap
protected

◆ AllowAMDGPUUnsafeFPAtomics

unsigned clang::TargetInfo::AllowAMDGPUUnsafeFPAtomics
protected

◆ ARMCDECoprocMask

unsigned clang::TargetInfo::ARMCDECoprocMask
protected

◆ BigEndian

bool clang::TargetInfo::BigEndian
protected

Definition at line 196 of file TargetInfo.h.

Referenced by isBigEndian(), isLittleEndian(), and TargetInfo().

◆ ComplexLongDoubleUsesFP2Ret

unsigned clang::TargetInfo::ComplexLongDoubleUsesFP2Ret
protected

Definition at line 222 of file TargetInfo.h.

Referenced by TargetInfo(), and useObjCFP2RetForComplexLongDouble().

◆ DataLayoutString

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

Definition at line 210 of file TargetInfo.h.

Referenced by getDataLayoutString(), and resetDataLayout().

◆ HasAArch64SVETypes

unsigned clang::TargetInfo::HasAArch64SVETypes
protected

◆ HasAlignMac68kSupport

unsigned clang::TargetInfo::HasAlignMac68kSupport
protected

◆ HasBFloat16

bool clang::TargetInfo::HasBFloat16
protected

◆ HasBuiltinMSVaList

unsigned clang::TargetInfo::HasBuiltinMSVaList
protected

◆ HasFloat128

bool clang::TargetInfo::HasFloat128
protected

◆ HasFloat16

bool clang::TargetInfo::HasFloat16
protected

◆ HasIbm128

bool clang::TargetInfo::HasIbm128
protected

Definition at line 205 of file TargetInfo.h.

Referenced by hasIbm128Type(), and TargetInfo().

◆ HasLegalHalfType

bool clang::TargetInfo::HasLegalHalfType
protected

◆ HasRISCVVTypes

unsigned clang::TargetInfo::HasRISCVVTypes
protected

◆ HasStrictFP

bool clang::TargetInfo::HasStrictFP
protected

◆ IsRenderScriptTarget

unsigned clang::TargetInfo::IsRenderScriptTarget
protected

◆ MaxAtomicInlineWidth

unsigned char clang::TargetInfo::MaxAtomicInlineWidth
protected

◆ MaxAtomicPromoteWidth

unsigned char clang::TargetInfo::MaxAtomicPromoteWidth
protected

◆ MaxOpenCLWorkGroupSize

unsigned clang::TargetInfo::MaxOpenCLWorkGroupSize
protected

Definition at line 236 of file TargetInfo.h.

Referenced by getMaxOpenCLWorkGroupSize(), and TargetInfo().

◆ MCountName

const char* clang::TargetInfo::MCountName
protected

◆ NoAsmVariants

bool clang::TargetInfo::NoAsmVariants
protected

◆ PlatformMinVersion

VersionTuple clang::TargetInfo::PlatformMinVersion
mutableprotected

Definition at line 218 of file TargetInfo.h.

Referenced by getPlatformMinVersion(), and TargetInfo().

◆ PlatformName

StringRef clang::TargetInfo::PlatformName
mutableprotected

Definition at line 217 of file TargetInfo.h.

Referenced by getPlatformName(), and TargetInfo().

◆ RealTypeUsesObjCFPRet

unsigned clang::TargetInfo::RealTypeUsesObjCFPRet
protected

Definition at line 221 of file TargetInfo.h.

Referenced by TargetInfo(), and useObjCFPRetForRealType().

◆ RegParmMax

unsigned char clang::TargetInfo::RegParmMax
protected

Definition at line 213 of file TargetInfo.h.

Referenced by getRegParmMax(), and TargetInfo().

◆ SimdDefaultAlign

unsigned short clang::TargetInfo::SimdDefaultAlign
protected

◆ SSERegParmMax

unsigned char clang::TargetInfo::SSERegParmMax
protected

Definition at line 213 of file TargetInfo.h.

Referenced by TargetInfo().

◆ TheCXXABI

TargetCXXABI clang::TargetInfo::TheCXXABI
protected

◆ TLSSupported

bool clang::TargetInfo::TLSSupported
protected

◆ UseAddrSpaceMapMangling

bool clang::TargetInfo::UseAddrSpaceMapMangling
protected

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

Definition at line 314 of file TargetInfo.h.

Referenced by clang::targets::AMDGPUTargetInfo::AMDGPUTargetInfo(), clang::targets::NVPTXTargetInfo::NVPTXTargetInfo(), TargetInfo(), and useAddressSpaceMapMangling().

◆ UserLabelPrefix

const char* clang::TargetInfo::UserLabelPrefix
protected

Definition at line 211 of file TargetInfo.h.

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

◆ VLASupported

bool clang::TargetInfo::VLASupported
protected

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