class TargetInfo
Declaration
class TargetInfo : public TransferrableTargetInfo,
public RefCountedBase { /* full declaration omitted */ };
Description
Exposes information about the current target.
Declared at: clang/include/clang/Basic/TargetInfo.h:190
Inherits from: TransferrableTargetInfo, RefCountedBase
Member Variables
- private std::shared_ptr<TargetOptions> TargetOpts
- private llvm::Triple Triple
- protected bool BigEndian
- protected bool TLSSupported
- protected bool VLASupported
- protected bool NoAsmVariants
- protected bool HasLegalHalfType
- protected bool HasFloat128
- protected bool HasFloat16
- protected bool HasBFloat16
- protected bool HasIbm128
- protected bool HasLongDouble
- protected bool HasFPReturn
- protected bool HasStrictFP
- protected unsigned char MaxAtomicPromoteWidth
- protected unsigned char MaxAtomicInlineWidth
- protected unsigned short SimdDefaultAlign
- protected std::string DataLayoutString
- protected const char* UserLabelPrefix
- protected const char* MCountName
- protected unsigned char RegParmMax
- protected unsigned char SSERegParmMax
- protected clang::TargetCXXABI TheCXXABI
- protected const clang::LangASMap* AddrSpaceMap
- protected unsigned int ProgramAddrSpace
- protected llvm::StringRef PlatformName
- protected llvm::VersionTuple PlatformMinVersion
- protected unsigned int HasAlignMac68kSupport
- protected unsigned int RealTypeUsesObjCFPRetMask
- protected unsigned int ComplexLongDoubleUsesFP2Ret
- protected unsigned int HasBuiltinMSVaList
- protected unsigned int IsRenderScriptTarget
- protected unsigned int HasAArch64SVETypes
- protected unsigned int HasRISCVVTypes
- protected unsigned int AllowAMDGPUUnsafeFPAtomics
- protected unsigned int ARMCDECoprocMask
- protected unsigned int MaxOpenCLWorkGroupSize
- protected Optional<unsigned int> MaxBitIntWidth
- protected Optional<llvm::Triple> DarwinTargetVariantTriple
- protected bool UseAddrSpaceMapMangling
- Specify if mangling based on address space map should be used or not for language specific address spaces
Inherited from TransferrableTargetInfo:
- public PointerWidth
- public PointerAlign
- public BoolWidth
- public BoolAlign
- public IntWidth
- public IntAlign
- public HalfWidth
- public HalfAlign
- public BFloat16Width
- public BFloat16Align
- public FloatWidth
- public FloatAlign
- public DoubleWidth
- public DoubleAlign
- public LongDoubleWidth
- public LongDoubleAlign
- public Float128Align
- public Ibm128Align
- public LargeArrayMinWidth
- public LargeArrayAlign
- public LongWidth
- public LongAlign
- public LongLongWidth
- public LongLongAlign
- public ShortAccumWidth
- public ShortAccumAlign
- public AccumWidth
- public AccumAlign
- public LongAccumWidth
- public LongAccumAlign
- public ShortFractWidth
- public ShortFractAlign
- public FractWidth
- public FractAlign
- public LongFractWidth
- public LongFractAlign
- public PaddingOnUnsignedFixedPoint
- public ShortAccumScale
- public AccumScale
- public LongAccumScale
- public DefaultAlignForAttributeAligned
- public MinGlobalAlign
- public SuitableAlign
- public NewAlign
- public MaxVectorAlign
- public MaxTLSAlign
- public HalfFormat
- public BFloat16Format
- public FloatFormat
- public DoubleFormat
- public LongDoubleFormat
- public Float128Format
- public Ibm128Format
- protected SizeType
- protected IntMaxType
- protected PtrDiffType
- protected IntPtrType
- protected WCharType
- protected WIntType
- protected Char16Type
- protected Char32Type
- protected Int64Type
- protected Int16Type
- protected SigAtomicType
- protected ProcessIDType
- protected UseSignedCharForObjCBool
- protected UseBitFieldTypeAlignment
- protected UseZeroLengthBitfieldAlignment
- protected UseLeadingZeroLengthBitfield
- protected UseExplicitBitFieldAlignment
- protected ZeroLengthBitfieldBoundary
- protected MaxAlignedAttribute
Method Overview
- public virtual char CPUSpecificManglingCharacter(llvm::StringRef Name) const
- private void CheckFixedPointBits() const
- public static clang::TargetInfo * CreateTargetInfo(clang::DiagnosticsEngine & Diags, const std::shared_ptr<TargetOptions> & Opts)
- protected TargetInfo(const llvm::Triple & T)
- public virtual void adjust(clang::DiagnosticsEngine & Diags, clang::LangOptions & Opts)
- public virtual void adjustTargetOptions(const clang::CodeGenOptions & CGOpts, clang::TargetOptions & TargetOpts) const
- public bool allowAMDGPUUnsafeFPAtomics() const
- public virtual bool allowDebugInfoForExternalRef() const
- public virtual bool allowsLargerPreferedTypeAlignment() const
- public virtual bool checkArithmeticFenceSupported() const
- public virtual bool checkCFProtectionBranchSupported(clang::DiagnosticsEngine & Diags) const
- public virtual bool checkCFProtectionReturnSupported(clang::DiagnosticsEngine & Diags) const
- public virtual clang::TargetInfo::CallingConvCheckResult checkCallingConvention(clang::CallingConv CC) const
- public virtual std::string convertConstraint(const char *& Constraint) const
- protected void copyAuxTarget(const clang::TargetInfo * Aux)
- public virtual bool defaultsToAIXPowerAlignment() const
- public bool doUnsignedFixedPointTypesHavePadding() const
- public virtual void fillValidCPUList(SmallVectorImpl<llvm::StringRef> & Values) const
- public virtual void fillValidTuneCPUList(SmallVectorImpl<llvm::StringRef> & Values) const
- public virtual llvm::StringRef getABI() const
- public uint32_t getARMCDECoprocMask() const
- public unsigned int getAccumAlign() const
- public unsigned int getAccumIBits() const
- public unsigned int getAccumScale() const
- public unsigned int getAccumWidth() const
- public const clang::LangASMap & getAddressSpaceMap() const
- public unsigned int getBFloat16Align() const
- public const llvm::fltSemantics & getBFloat16Format() const
- public virtual const char * getBFloat16Mangling() const
- public unsigned int getBFloat16Width() const
- public unsigned int getBoolAlign() const
- public unsigned int getBoolWidth() const
- public virtual clang::TargetInfo::BuiltinVaListKind getBuiltinVaListKind() const
- public virtual Optional<unsigned int> getCPUCacheLineSize() const
- public virtual void getCPUSpecificCPUDispatchFeatures(llvm::StringRef Name, llvm::SmallVectorImpl<StringRef> & Features) const
- public virtual llvm::StringRef getCPUSpecificTuneName(llvm::StringRef Name) const
- public virtual clang::LangAS getCUDABuiltinAddressSpace(unsigned int AS) const
- public clang::TargetCXXABI getCXXABI() const
- public virtual clang::TargetInfo::CallingConvKind getCallingConvKind(bool ClangABICompat4) const
- public unsigned int getChar16Align() const
- public clang::TransferrableTargetInfo::IntType getChar16Type() const
- public unsigned int getChar16Width() const
- public unsigned int getChar32Align() const
- public clang::TransferrableTargetInfo::IntType getChar32Type() const
- public unsigned int getChar32Width() const
- public unsigned int getCharAlign() const
- public unsigned int getCharWidth() const
- public virtual const char * getClobbers() const
- public virtual llvm::Optional<LangAS> getConstantAddressSpace() const
- public virtual llvm::StringRef getConstraintRegister(llvm::StringRef Constraint, llvm::StringRef Expression) const
- public static clang::TransferrableTargetInfo::IntType getCorrespondingUnsignedType(clang::TransferrableTargetInfo::IntType T)
- public virtual Optional<unsigned int> getDWARFAddressSpace(unsigned int AddressSpace) const
- public const Optional<llvm::VersionTuple> getDarwinTargetVariantSDKVersion() const
- public const llvm::Triple * getDarwinTargetVariantTriple() const
- public const char * getDataLayoutString() const
- public unsigned int getDefaultAlignForAttributeAligned() const
- public virtual clang::CallingConv getDefaultCallingConv() const
- public unsigned int getDoubleAlign() const
- public const llvm::fltSemantics & getDoubleFormat() const
- public unsigned int getDoubleWidth() const
- public virtual int getEHDataRegisterNumber(unsigned int RegNo) const
- public virtual unsigned int getExnObjectAlignment() const
- public virtual LangOptions::FPEvalMethodKind getFPEvalMethod() const
- public unsigned int getFloat128Align() const
- public const llvm::fltSemantics & getFloat128Format() const
- public virtual const char * getFloat128Mangling() const
- public unsigned int getFloat128Width() const
- public unsigned int getFloatAlign() const
- public const llvm::fltSemantics & getFloatFormat() const
- public unsigned int getFloatWidth() const
- public unsigned int getFractAlign() const
- public unsigned int getFractScale() const
- public unsigned int getFractWidth() const
- protected virtual ArrayRef<clang::TargetInfo::AddlRegName> getGCCAddlRegNames() const
- protected virtual ArrayRef<clang::TargetInfo::GCCRegAlias> getGCCRegAliases() const
- protected virtual ArrayRef<const char *> getGCCRegNames() const
- public virtual const llvm::omp::GV & getGridValue() const
- public unsigned int getHalfAlign() const
- public const llvm::fltSemantics & getHalfFormat() const
- public unsigned int getHalfWidth() const
- public unsigned int getIbm128Align() const
- public const llvm::fltSemantics & getIbm128Format() const
- public virtual const char * getIbm128Mangling() const
- public unsigned int getIbm128Width() const
- public clang::TransferrableTargetInfo::IntType getInt16Type() const
- public clang::TransferrableTargetInfo::IntType getInt64Type() const
- public unsigned int getIntAlign() const
- public unsigned int getIntMaxTWidth() const
- public clang::TransferrableTargetInfo::IntType getIntMaxType() const
- public clang::TransferrableTargetInfo::IntType getIntPtrType() const
- public virtual clang::TransferrableTargetInfo::IntType getIntTypeByWidth(unsigned int BitWidth, bool IsSigned) const
- public unsigned int getIntWidth() const
- public unsigned int getLargeArrayAlign() const
- public unsigned int getLargeArrayMinWidth() const
- public virtual clang::TransferrableTargetInfo::IntType getLeastIntTypeByWidth(unsigned int BitWidth, bool IsSigned) const
- public unsigned int getLongAccumAlign() const
- public unsigned int getLongAccumIBits() const
- public unsigned int getLongAccumScale() const
- public unsigned int getLongAccumWidth() const
- public unsigned int getLongAlign() const
- public unsigned int getLongDoubleAlign() const
- public const llvm::fltSemantics & getLongDoubleFormat() const
- public virtual const char * getLongDoubleMangling() const
- public unsigned int getLongDoubleWidth() const
- public unsigned int getLongFractAlign() const
- public unsigned int getLongFractScale() const
- public unsigned int getLongFractWidth() const
- public unsigned int getLongLongAlign() const
- public unsigned int getLongLongWidth() const
- public unsigned int getLongWidth() const
- public const char * getMCountName() const
- public unsigned int getMaxAlignedAttribute() const
- public unsigned int getMaxAtomicInlineWidth() const
- public unsigned int getMaxAtomicPromoteWidth() const
- public virtual size_t getMaxBitIntWidth() const
- public unsigned int getMaxOpenCLWorkGroupSize() const
- public virtual uint64_t getMaxPointerWidth() const
- public unsigned int getMaxTLSAlign() const
- public unsigned int getMaxVectorAlign() const
- public virtual unsigned int getMinGlobalAlign(uint64_t) const
- public unsigned int getNewAlign() const
- public llvm::StringRef getNormalizedGCCRegisterName(llvm::StringRef Name, bool ReturnCanonical = false) const
- public virtual uint64_t getNullPointerValue(clang::LangAS AddrSpace) const
- public virtual clang::LangAS getOpenCLBuiltinAddressSpace(unsigned int AS) const
- public virtual clang::LangAS getOpenCLTypeAddrSpace(clang::OpenCLTypeKind TK) const
- public llvm::VersionTuple getPlatformMinVersion() const
- public llvm::StringRef getPlatformName() const
- public uint64_t getPointerAlign(unsigned int AddrSpace) const
- protected virtual uint64_t getPointerAlignV(unsigned int AddrSpace) const
- public uint64_t getPointerWidth(unsigned int AddrSpace) const
- protected virtual uint64_t getPointerWidthV(unsigned int AddrSpace) const
- public clang::TransferrableTargetInfo::IntType getProcessIDType() const
- public unsigned int getProgramAddressSpace() const
- public clang::TransferrableTargetInfo::IntType getPtrDiffType(unsigned int AddrSpace) const
- protected virtual enum IntType getPtrDiffTypeV(unsigned int AddrSpace) const
- public clang::FloatModeKind getRealTypeByWidth(unsigned int BitWidth, clang::FloatModeKind ExplicitType) const
- public unsigned int getRegParmMax() const
- public virtual unsigned int getRegisterWidth() const
- public const llvm::VersionTuple & getSDKVersion() const
- public unsigned int getShortAccumAlign() const
- public unsigned int getShortAccumIBits() const
- public unsigned int getShortAccumScale() const
- public unsigned int getShortAccumWidth() const
- public unsigned int getShortAlign() const
- public unsigned int getShortFractAlign() const
- public unsigned int getShortFractScale() const
- public unsigned int getShortFractWidth() const
- public unsigned int getShortWidth() const
- public clang::TransferrableTargetInfo::IntType getSigAtomicType() const
- public clang::TransferrableTargetInfo::IntType getSignedSizeType() const
- public unsigned int getSimdDefaultAlign() const
- public clang::TransferrableTargetInfo::IntType getSizeType() const
- public virtual const char * getStaticInitSectionSpecifier() const
- public unsigned int getSuitableAlign() const
- public llvm::StringMap<bool> & getSupportedOpenCLOpts()
- public const llvm::StringMap<bool> & getSupportedOpenCLOpts() const
- public virtual ArrayRef<Builtin::Info> getTargetBuiltins() const
- public virtual void getTargetDefines(const clang::LangOptions & Opts, clang::MacroBuilder & Builder) const
- public virtual llvm::Optional<std::string> getTargetID() const
- public clang::TargetOptions & getTargetOpts() const
- public const llvm::Triple & getTriple() const
- public unsigned int getTypeAlign(clang::TransferrableTargetInfo::IntType T) const
- public const char * getTypeConstantSuffix(clang::TransferrableTargetInfo::IntType T) const
- public static const char * getTypeFormatModifier(clang::TransferrableTargetInfo::IntType T)
- public static const char * getTypeName(clang::TransferrableTargetInfo::IntType T)
- public unsigned int getTypeWidth(clang::TransferrableTargetInfo::IntType T) const
- public clang::TransferrableTargetInfo::IntType getUInt16Type() const
- public clang::TransferrableTargetInfo::IntType getUInt64Type() const
- public clang::TransferrableTargetInfo::IntType getUIntMaxType() const
- public clang::TransferrableTargetInfo::IntType getUIntPtrType() const
- public unsigned int getUnsignedAccumIBits() const
- public unsigned int getUnsignedAccumScale() const
- public unsigned int getUnsignedFractScale() const
- public unsigned int getUnsignedLongAccumIBits() const
- public unsigned int getUnsignedLongAccumScale() const
- public unsigned int getUnsignedLongFractScale() const
- public clang::TransferrableTargetInfo::IntType getUnsignedPtrDiffType(unsigned int AddrSpace) const
- public unsigned int getUnsignedShortAccumIBits() const
- public unsigned int getUnsignedShortAccumScale() const
- public unsigned int getUnsignedShortFractScale() const
- public virtual unsigned int getUnwindWordWidth() const
- public const char * getUserLabelPrefix() const
- public virtual Optional<std::pair<unsigned int, unsigned int>> getVScaleRange(const clang::LangOptions & LangOpts) const
- public virtual unsigned int getVtblPtrAddressSpace() const
- public unsigned int getWCharAlign() const
- public clang::TransferrableTargetInfo::IntType getWCharType() const
- public unsigned int getWCharWidth() const
- public clang::TransferrableTargetInfo::IntType getWIntType() const
- public unsigned int getZeroLengthBitfieldBoundary() const
- public virtual llvm::Optional<std::string> handleAsmEscapedChar(char C) const
- public virtual bool handleTargetFeatures(std::vector<std::string> & Features, clang::DiagnosticsEngine & Diags)
- public bool hasAArch64SVETypes() const
- public bool hasAlignMac68kSupport() const
- public virtual bool hasBFloat16Type() const
- public virtual bool hasBitIntType() const
- public virtual bool hasBuiltinAtomic(uint64_t AtomicSizeInBits, uint64_t AlignmentInBits) const
- public bool hasBuiltinMSVaList() const
- public virtual bool hasFPReturn() const
- public virtual bool hasFeature(llvm::StringRef Feature) const
- public virtual bool hasFeatureEnabled(const llvm::StringMap<bool> & Features, llvm::StringRef Name) const
- public virtual bool hasFloat128Type() const
- public virtual bool hasFloat16Type() const
- public virtual bool hasIbm128Type() const
- public virtual bool hasInt128Type() const
- public virtual bool hasLegalHalfType() const
- public virtual bool hasLongDoubleType() const
- public bool hasNoAsmVariants() const
- public virtual bool hasPS4DLLImportExport() const
- public virtual bool hasProtectedVisibility() const
- public bool hasRISCVVTypes() const
- public virtual bool hasSjLjLowering() const
- public virtual bool hasStrictFP() const
- public virtual bool initFeatureMap(llvm::StringMap<bool> & Features, clang::DiagnosticsEngine & Diags, llvm::StringRef CPU, const std::vector<std::string> & FeatureVec) const
- public bool isBigEndian() const
- public virtual bool isBranchProtectionSupportedArch(llvm::StringRef Arch) const
- public virtual bool isCLZForZeroUndef() const
- public bool isLittleEndian() const
- public virtual bool isNan2008() const
- public bool isRenderScriptTarget() const
- public bool isSEHTrySupported() const
- public virtual bool isSPRegName(llvm::StringRef) const
- public bool isTLSSupported() const
- public static bool isTypeSigned(clang::TransferrableTargetInfo::IntType T)
- public bool isVLASupported() const
- public virtual bool isValidCPUName(llvm::StringRef Name) const
- public bool isValidClobber(llvm::StringRef Name) const
- public virtual bool isValidFeatureName(llvm::StringRef Feature) const
- public virtual bool isValidGCCRegisterName(llvm::StringRef Name) const
- public virtual bool isValidTuneCPUName(llvm::StringRef Name) const
- public virtual unsigned int multiVersionSortPriority(llvm::StringRef Name) const
- public void noSignedCharForObjCBool()
- protected void resetDataLayout(llvm::StringRef DL, const char * UserLabelPrefix = "")
- public bool resolveSymbolicName(const char *& Name, ArrayRef<clang::TargetInfo::ConstraintInfo> OutputConstraints, unsigned int & Index) const
- public virtual bool setABI(const std::string & Name)
- public virtual void setAuxTarget(const clang::TargetInfo * Aux)
- public virtual bool setCPU(const std::string & Name)
- public virtual void setCommandLineOpenCLOpts()
- public virtual bool setFPMath(llvm::StringRef Name)
- public virtual void setFeatureEnabled(llvm::StringMap<bool> & Features, llvm::StringRef Name, bool Enabled) const
- public virtual void setMaxAtomicWidth()
- public virtual void setSupportedOpenCLOpts()
- public virtual bool shouldDLLImportComdatSymbols() const
- public virtual void supportAllOpenCLOpts(bool V = true)
- public virtual bool supportSourceEvalMethod() const
- public virtual bool supportsExtendIntArgs() const
- public bool supportsIFunc() const
- public bool supportsMultiVersioning() const
- public virtual bool supportsTargetAttributeTune() const
- public bool useAddressSpaceMapMangling() const
- public bool useBitFieldTypeAlignment() const
- public bool useExplicitBitFieldAlignment() const
- public virtual bool useFP16ConversionIntrinsics() const
- public bool useLeadingZeroLengthBitfield() const
- public bool useObjCFP2RetForComplexLongDouble() const
- public bool useObjCFPRetForRealType(clang::FloatModeKind T) const
- public bool useSignedCharForObjCBool() const
- public bool useZeroLengthBitfieldAlignment() const
- public virtual bool validateAsmConstraint(const char *& Name, TargetInfo::ConstraintInfo & info) const
- public virtual bool validateBranchProtection(llvm::StringRef Spec, llvm::StringRef Arch, clang::TargetInfo::BranchProtectionInfo & BPI, llvm::StringRef & Err) const
- public virtual bool validateCPUSpecificCPUDispatch(llvm::StringRef Name) const
- public virtual bool validateConstraintModifier(llvm::StringRef, char, unsigned int, std::string &) const
- public virtual bool validateCpuIs(llvm::StringRef Name) const
- public virtual bool validateCpuSupports(llvm::StringRef Name) const
- public virtual bool validateGlobalRegisterVariable(llvm::StringRef RegName, unsigned int RegSize, bool & HasSizeMismatch) const
- public bool validateInputConstraint(MutableArrayRef<clang::TargetInfo::ConstraintInfo> OutputConstraints, clang::TargetInfo::ConstraintInfo & info) const
- public virtual bool validateInputSize(const llvm::StringMap<bool> & FeatureMap, llvm::StringRef, unsigned int) const
- public virtual bool validateOpenCLTarget(const clang::LangOptions & Opts, clang::DiagnosticsEngine & Diags) const
- public bool validateOutputConstraint(clang::TargetInfo::ConstraintInfo & Info) const
- public virtual bool validateOutputSize(const llvm::StringMap<bool> & FeatureMap, llvm::StringRef, unsigned int) const
- public virtual bool validateTarget(clang::DiagnosticsEngine & Diags) const
- public virtual ~TargetInfo()
Methods
¶virtual char CPUSpecificManglingCharacter(
llvm::StringRef Name) const
virtual char CPUSpecificManglingCharacter(
llvm::StringRef Name) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1386
Parameters
- llvm::StringRef Name
¶void CheckFixedPointBits() const
void CheckFixedPointBits() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1673
¶static clang::TargetInfo* CreateTargetInfo(
clang::DiagnosticsEngine& Diags,
const std::shared_ptr<TargetOptions>& Opts)
static clang::TargetInfo* CreateTargetInfo(
clang::DiagnosticsEngine& Diags,
const std::shared_ptr<TargetOptions>& Opts)
Description
Construct a target for the given options.
Declared at: clang/include/clang/Basic/TargetInfo.h:260
Parameters
- clang::DiagnosticsEngine& Diags
- const std::shared_ptr<TargetOptions>& 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.
¶TargetInfo(const llvm::Triple& T)
TargetInfo(const llvm::Triple& T)
Declared at: clang/include/clang/Basic/TargetInfo.h:247
Parameters
- const llvm::Triple& T
¶virtual void adjust(
clang::DiagnosticsEngine& Diags,
clang::LangOptions& Opts)
virtual void adjust(
clang::DiagnosticsEngine& Diags,
clang::LangOptions& Opts)
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:1226
Parameters
- clang::DiagnosticsEngine& Diags
- clang::LangOptions& Opts
¶virtual void adjustTargetOptions(
const clang::CodeGenOptions& CGOpts,
clang::TargetOptions& TargetOpts) const
virtual void adjustTargetOptions(
const clang::CodeGenOptions& CGOpts,
clang::TargetOptions& TargetOpts) const
Description
Adjust target options based on codegen options.
Declared at: clang/include/clang/Basic/TargetInfo.h:1229
Parameters
- const clang::CodeGenOptions& CGOpts
- clang::TargetOptions& TargetOpts
¶bool allowAMDGPUUnsafeFPAtomics() const
bool allowAMDGPUUnsafeFPAtomics() const
Description
Returns whether or not the AMDGPU unsafe floating point atomics are allowed.
Declared at: clang/include/clang/Basic/TargetInfo.h:963
¶virtual bool allowDebugInfoForExternalRef() const
virtual bool allowDebugInfoForExternalRef() const
Description
Whether target allows debuginfo types for decl only variables/functions.
Declared at: clang/include/clang/Basic/TargetInfo.h:1635
¶virtual bool allowsLargerPreferedTypeAlignment()
const
virtual bool allowsLargerPreferedTypeAlignment()
const
Description
Whether target allows to overalign ABI-specified preferred alignment
Declared at: clang/include/clang/Basic/TargetInfo.h:1558
¶virtual bool checkArithmeticFenceSupported() const
virtual bool checkArithmeticFenceSupported() const
Description
Controls if __arithmetic_fence is supported in the targeted backend.
Declared at: clang/include/clang/Basic/TargetInfo.h:1504
¶virtual bool checkCFProtectionBranchSupported(
clang::DiagnosticsEngine& Diags) const
virtual bool checkCFProtectionBranchSupported(
clang::DiagnosticsEngine& Diags) const
Description
Check if the target supports CFProtection branch.
Declared at: clang/include/clang/Basic/TargetInfo.h:1551
Parameters
- clang::DiagnosticsEngine& Diags
¶virtual bool checkCFProtectionReturnSupported(
clang::DiagnosticsEngine& Diags) const
virtual bool checkCFProtectionReturnSupported(
clang::DiagnosticsEngine& Diags) const
Description
Check if the target supports CFProtection branch.
Declared at: clang/include/clang/Basic/TargetInfo.h:1555
Parameters
- clang::DiagnosticsEngine& Diags
¶virtual clang::TargetInfo::CallingConvCheckResult
checkCallingConvention(
clang::CallingConv CC) const
virtual clang::TargetInfo::CallingConvCheckResult
checkCallingConvention(
clang::CallingConv CC) const
Description
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).
Declared at: clang/include/clang/Basic/TargetInfo.h:1526
Parameters
- clang::CallingConv CC
¶virtual std::string convertConstraint(
const char*& Constraint) const
virtual std::string convertConstraint(
const char*& Constraint) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1148
Parameters
- const char*& Constraint
¶void copyAuxTarget(const clang::TargetInfo* Aux)
void copyAuxTarget(const clang::TargetInfo* Aux)
Description
Copy type and layout related info.
Declared at: clang/include/clang/Basic/TargetInfo.h:1654
Parameters
- const clang::TargetInfo* Aux
¶virtual bool defaultsToAIXPowerAlignment() const
virtual bool defaultsToAIXPowerAlignment() const
Description
Whether target defaults to the `power` alignment rules of AIX.
Declared at: clang/include/clang/Basic/TargetInfo.h:1561
¶bool doUnsignedFixedPointTypesHavePadding() const
bool doUnsignedFixedPointTypesHavePadding() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:390
¶virtual void fillValidCPUList(
SmallVectorImpl<llvm::StringRef>& Values)
const
virtual void fillValidCPUList(
SmallVectorImpl<llvm::StringRef>& Values)
const
Description
Fill a SmallVectorImpl with the valid values to setCPU.
Declared at: clang/include/clang/Basic/TargetInfo.h:1256
Parameters
- SmallVectorImpl<llvm::StringRef>& Values
¶virtual void fillValidTuneCPUList(
SmallVectorImpl<llvm::StringRef>& Values)
const
virtual void fillValidTuneCPUList(
SmallVectorImpl<llvm::StringRef>& Values)
const
Description
Fill a SmallVectorImpl with the valid values for tuning CPU.
Declared at: clang/include/clang/Basic/TargetInfo.h:1259
Parameters
- SmallVectorImpl<llvm::StringRef>& Values
¶virtual llvm::StringRef getABI() const
virtual llvm::StringRef getABI() const
Description
Get the ABI currently in use.
Declared at: clang/include/clang/Basic/TargetInfo.h:1241
¶uint32_t getARMCDECoprocMask() const
uint32_t getARMCDECoprocMask() const
Description
For ARM targets returns a mask defining which coprocessors are configured as Custom Datapath.
Declared at: clang/include/clang/Basic/TargetInfo.h:967
¶unsigned int getAccumAlign() const
unsigned int getAccumAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:481
¶unsigned int getAccumIBits() const
unsigned int getAccumIBits() const
Declared at: clang/include/clang/Basic/TargetInfo.h:513
¶unsigned int getAccumScale() const
unsigned int getAccumScale() const
Description
getAccumScale/IBits - Return the number of fractional/integral bits in a 'signed _Accum' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:512
¶unsigned int getAccumWidth() const
unsigned int getAccumWidth() const
Description
getAccumWidth/Align - Return the size of 'signed _Accum' and 'unsigned _Accum' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:480
¶const clang::LangASMap& getAddressSpaceMap() const
const clang::LangASMap& getAddressSpaceMap() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1461
¶unsigned int getBFloat16Align() const
unsigned int getBFloat16Align() const
Declared at: clang/include/clang/Basic/TargetInfo.h:693
¶const llvm::fltSemantics& getBFloat16Format()
const
const llvm::fltSemantics& getBFloat16Format()
const
Declared at: clang/include/clang/Basic/TargetInfo.h:694
¶virtual const char* getBFloat16Mangling() const
virtual const char* getBFloat16Mangling() const
Description
Return the mangled code of bfloat.
Declared at: clang/include/clang/Basic/TargetInfo.h:735
¶unsigned int getBFloat16Width() const
unsigned int getBFloat16Width() const
Description
getBFloat16Width/Align/Format - Return the size/align/format of '__bf16'.
Declared at: clang/include/clang/Basic/TargetInfo.h:692
¶unsigned int getBoolAlign() const
unsigned int getBoolAlign() const
Description
Return the alignment of '_Bool' and C++ 'bool' for this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:445
¶unsigned int getBoolWidth() const
unsigned int getBoolWidth() const
Description
Return the size of '_Bool' and C++ 'bool' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:442
¶virtual clang::TargetInfo::BuiltinVaListKind
getBuiltinVaListKind() const
virtual clang::TargetInfo::BuiltinVaListKind
getBuiltinVaListKind() const
Description
Returns the kind of __builtin_va_list type that should be used with this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:944
¶virtual Optional<unsigned int>
getCPUCacheLineSize() const
virtual Optional<unsigned int>
getCPUCacheLineSize() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1409
¶virtual void getCPUSpecificCPUDispatchFeatures(
llvm::StringRef Name,
llvm::SmallVectorImpl<StringRef>& Features)
const
virtual void getCPUSpecificCPUDispatchFeatures(
llvm::StringRef Name,
llvm::SmallVectorImpl<StringRef>& Features)
const
Declared at: clang/include/clang/Basic/TargetInfo.h:1401
Parameters
- llvm::StringRef Name
- llvm::SmallVectorImpl<StringRef>& Features
¶virtual llvm::StringRef getCPUSpecificTuneName(
llvm::StringRef Name) const
virtual llvm::StringRef getCPUSpecificTuneName(
llvm::StringRef Name) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1393
Parameters
- llvm::StringRef Name
¶virtual clang::LangAS getCUDABuiltinAddressSpace(
unsigned int AS) const
virtual clang::LangAS getCUDABuiltinAddressSpace(
unsigned int AS) const
Description
Map from the address space field in builtin description strings to the language address space.
Declared at: clang/include/clang/Basic/TargetInfo.h:1471
Parameters
- unsigned int AS
¶clang::TargetCXXABI getCXXABI() const
clang::TargetCXXABI getCXXABI() const
Description
Get the C++ ABI currently in use.
Declared at: clang/include/clang/Basic/TargetInfo.h:1244
¶virtual clang::TargetInfo::CallingConvKind
getCallingConvKind(bool ClangABICompat4) const
virtual clang::TargetInfo::CallingConvKind
getCallingConvKind(bool ClangABICompat4) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1541
Parameters
- bool ClangABICompat4
¶unsigned int getChar16Align() const
unsigned int getChar16Align() const
Declared at: clang/include/clang/Basic/TargetInfo.h:674
¶clang::TransferrableTargetInfo::IntType
getChar16Type() const
clang::TransferrableTargetInfo::IntType
getChar16Type() const
Declared at: clang/include/clang/Basic/TargetInfo.h:356
¶unsigned int getChar16Width() const
unsigned int getChar16Width() const
Description
getChar16Width/Align - Return the size of 'char16_t' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:673
¶unsigned int getChar32Align() const
unsigned int getChar32Align() const
Declared at: clang/include/clang/Basic/TargetInfo.h:679
¶clang::TransferrableTargetInfo::IntType
getChar32Type() const
clang::TransferrableTargetInfo::IntType
getChar32Type() const
Declared at: clang/include/clang/Basic/TargetInfo.h:357
¶unsigned int getChar32Width() const
unsigned int getChar32Width() const
Description
getChar32Width/Align - Return the size of 'char32_t' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:678
¶unsigned int getCharAlign() const
unsigned int getCharAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:448
¶unsigned int getCharWidth() const
unsigned int getCharWidth() const
Declared at: clang/include/clang/Basic/TargetInfo.h:447
¶virtual const char* getClobbers() const
virtual const char* getClobbers() const
Description
Returns a string of target-specific clobbers, in LLVM format.
Declared at: clang/include/clang/Basic/TargetInfo.h:1162
¶virtual llvm::Optional<LangAS>
getConstantAddressSpace() const
virtual llvm::Optional<LangAS>
getConstantAddressSpace() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:1479
¶virtual llvm::StringRef getConstraintRegister(
llvm::StringRef Constraint,
llvm::StringRef Expression) const
virtual llvm::StringRef getConstraintRegister(
llvm::StringRef Constraint,
llvm::StringRef Expression) const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:997
Parameters
- llvm::StringRef Constraint
- llvm::StringRef Expression
¶static clang::TransferrableTargetInfo::IntType
getCorrespondingUnsignedType(
clang::TransferrableTargetInfo::IntType T)
static clang::TransferrableTargetInfo::IntType
getCorrespondingUnsignedType(
clang::TransferrableTargetInfo::IntType T)
Declared at: clang/include/clang/Basic/TargetInfo.h:369
Parameters
- clang::TransferrableTargetInfo::IntType T
¶virtual Optional<unsigned int>
getDWARFAddressSpace(
unsigned int AddressSpace) const
virtual Optional<unsigned int>
getDWARFAddressSpace(
unsigned int AddressSpace) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1612
Parameters
- unsigned int AddressSpace
Returns
Otherwise return None and no conversion will be emitted in the DWARF.
¶const Optional<llvm::VersionTuple>
getDarwinTargetVariantSDKVersion() const
const Optional<llvm::VersionTuple>
getDarwinTargetVariantSDKVersion() const
Description
Returns the version of the darwin target variant SDK which was used during the compilation if one was specified, or an empty version otherwise.
Declared at: clang/include/clang/Basic/TargetInfo.h:1646
¶const llvm::Triple* getDarwinTargetVariantTriple()
const
const llvm::Triple* getDarwinTargetVariantTriple()
const
Description
Returns the darwin target variant triple, the variant of the deployment target for which the code is being compiled.
Declared at: clang/include/clang/Basic/TargetInfo.h:1639
¶const char* getDataLayoutString() const
const char* getDataLayoutString() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1178
¶unsigned int getDefaultAlignForAttributeAligned()
const
unsigned int getDefaultAlignForAttributeAligned()
const
Description
Return the default alignment for __attribute__((aligned)) on this target, to be used if no alignment value is specified.
Declared at: clang/include/clang/Basic/TargetInfo.h:649
¶virtual clang::CallingConv getDefaultCallingConv()
const
virtual clang::CallingConv getDefaultCallingConv()
const
Description
Gets the default calling convention for the given target and declaration context.
Declared at: clang/include/clang/Basic/TargetInfo.h:1508
¶unsigned int getDoubleAlign() const
unsigned int getDoubleAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:698
¶const llvm::fltSemantics& getDoubleFormat() const
const llvm::fltSemantics& getDoubleFormat() const
Declared at: clang/include/clang/Basic/TargetInfo.h:699
¶unsigned int getDoubleWidth() const
unsigned int getDoubleWidth() const
Description
getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
Declared at: clang/include/clang/Basic/TargetInfo.h:697
¶virtual int getEHDataRegisterNumber(
unsigned int RegNo) const
virtual int getEHDataRegisterNumber(
unsigned int RegNo) const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:1452
Parameters
- unsigned int RegNo
¶virtual unsigned int getExnObjectAlignment() const
virtual unsigned int getExnObjectAlignment() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:782
¶virtual LangOptions::FPEvalMethodKind
getFPEvalMethod() const
virtual LangOptions::FPEvalMethodKind
getFPEvalMethod() const
Description
Return the value for the C99 FLT_EVAL_METHOD macro.
Declared at: clang/include/clang/Basic/TargetInfo.h:740
¶unsigned int getFloat128Align() const
unsigned int getFloat128Align() const
Declared at: clang/include/clang/Basic/TargetInfo.h:712
¶const llvm::fltSemantics& getFloat128Format()
const
const llvm::fltSemantics& getFloat128Format()
const
Declared at: clang/include/clang/Basic/TargetInfo.h:713
¶virtual const char* getFloat128Mangling() const
virtual const char* getFloat128Mangling() const
Description
Return the mangled code of __float128.
Declared at: clang/include/clang/Basic/TargetInfo.h:727
¶unsigned int getFloat128Width() const
unsigned int getFloat128Width() const
Description
getFloat128Width/Align/Format - Return the size/align/format of '__float128'.
Declared at: clang/include/clang/Basic/TargetInfo.h:711
¶unsigned int getFloatAlign() const
unsigned int getFloatAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:688
¶const llvm::fltSemantics& getFloatFormat() const
const llvm::fltSemantics& getFloatFormat() const
Declared at: clang/include/clang/Basic/TargetInfo.h:689
¶unsigned int getFloatWidth() const
unsigned int getFloatWidth() const
Description
getFloatWidth/Align/Format - Return the size/align/format of 'float'.
Declared at: clang/include/clang/Basic/TargetInfo.h:687
¶unsigned int getFractAlign() const
unsigned int getFractAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:496
¶unsigned int getFractScale() const
unsigned int getFractScale() const
Description
getFractScale - Return the number of fractional bits in a 'signed _Fract' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:560
¶unsigned int getFractWidth() const
unsigned int getFractWidth() const
Description
getFractWidth/Align - Return the size of 'signed _Fract' and 'unsigned _Fract' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:495
¶virtual ArrayRef<clang::TargetInfo::AddlRegName>
getGCCAddlRegNames() const
virtual ArrayRef<clang::TargetInfo::AddlRegName>
getGCCAddlRegNames() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1666
¶virtual ArrayRef<clang::TargetInfo::GCCRegAlias>
getGCCRegAliases() const
virtual ArrayRef<clang::TargetInfo::GCCRegAlias>
getGCCRegAliases() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1665
¶virtual ArrayRef<const char*> getGCCRegNames()
const
virtual ArrayRef<const char*> getGCCRegNames()
const
Declared at: clang/include/clang/Basic/TargetInfo.h:1664
¶virtual const llvm::omp::GV& getGridValue() const
virtual const llvm::omp::GV& getGridValue() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1485
¶unsigned int getHalfAlign() const
unsigned int getHalfAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:683
¶const llvm::fltSemantics& getHalfFormat() const
const llvm::fltSemantics& getHalfFormat() const
Declared at: clang/include/clang/Basic/TargetInfo.h:684
¶unsigned int getHalfWidth() const
unsigned int getHalfWidth() const
Description
getHalfWidth/Align/Format - Return the size/align/format of 'half'.
Declared at: clang/include/clang/Basic/TargetInfo.h:682
¶unsigned int getIbm128Align() const
unsigned int getIbm128Align() const
Declared at: clang/include/clang/Basic/TargetInfo.h:720
¶const llvm::fltSemantics& getIbm128Format() const
const llvm::fltSemantics& getIbm128Format() const
Declared at: clang/include/clang/Basic/TargetInfo.h:721
¶virtual const char* getIbm128Mangling() const
virtual const char* getIbm128Mangling() const
Description
Return the mangled code of __ibm128.
Declared at: clang/include/clang/Basic/TargetInfo.h:730
¶unsigned int getIbm128Width() const
unsigned int getIbm128Width() const
Description
getIbm128Width/Align/Format - Return the size/align/format of '__ibm128'.
Declared at: clang/include/clang/Basic/TargetInfo.h:719
¶clang::TransferrableTargetInfo::IntType
getInt16Type() const
clang::TransferrableTargetInfo::IntType
getInt16Type() const
Declared at: clang/include/clang/Basic/TargetInfo.h:362
¶clang::TransferrableTargetInfo::IntType
getInt64Type() const
clang::TransferrableTargetInfo::IntType
getInt64Type() const
Declared at: clang/include/clang/Basic/TargetInfo.h:358
¶unsigned int getIntAlign() const
unsigned int getIntAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:461
¶unsigned int getIntMaxTWidth() const
unsigned int getIntMaxTWidth() const
Description
Return the size of intmax_t and uintmax_t for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:795
¶clang::TransferrableTargetInfo::IntType
getIntMaxType() const
clang::TransferrableTargetInfo::IntType
getIntMaxType() const
Declared at: clang/include/clang/Basic/TargetInfo.h:340
¶clang::TransferrableTargetInfo::IntType
getIntPtrType() const
clang::TransferrableTargetInfo::IntType
getIntPtrType() const
Declared at: clang/include/clang/Basic/TargetInfo.h:350
¶virtual clang::TransferrableTargetInfo::IntType
getIntTypeByWidth(unsigned int BitWidth,
bool IsSigned) const
virtual clang::TransferrableTargetInfo::IntType
getIntTypeByWidth(unsigned int BitWidth,
bool IsSigned) const
Description
Return integer type with specified width.
Declared at: clang/include/clang/Basic/TargetInfo.h:400
Parameters
- unsigned int BitWidth
- bool IsSigned
¶unsigned int getIntWidth() const
unsigned int getIntWidth() const
Description
getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:460
¶unsigned int getLargeArrayAlign() const
unsigned int getLargeArrayAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:749
¶unsigned int getLargeArrayMinWidth() const
unsigned int getLargeArrayMinWidth() const
Declared at: clang/include/clang/Basic/TargetInfo.h:748
¶virtual clang::TransferrableTargetInfo::IntType
getLeastIntTypeByWidth(unsigned int BitWidth,
bool IsSigned) const
virtual clang::TransferrableTargetInfo::IntType
getLeastIntTypeByWidth(unsigned int BitWidth,
bool IsSigned) const
Description
Return the smallest integer type with at least the specified width.
Declared at: clang/include/clang/Basic/TargetInfo.h:403
Parameters
- unsigned int BitWidth
- bool IsSigned
¶unsigned int getLongAccumAlign() const
unsigned int getLongAccumAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:486
¶unsigned int getLongAccumIBits() const
unsigned int getLongAccumIBits() const
Declared at: clang/include/clang/Basic/TargetInfo.h:518
¶unsigned int getLongAccumScale() const
unsigned int getLongAccumScale() const
Description
getLongAccumScale/IBits - Return the number of fractional/integral bits in a 'signed long _Accum' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:517
¶unsigned int getLongAccumWidth() const
unsigned int getLongAccumWidth() const
Description
getLongAccumWidth/Align - Return the size of 'signed long _Accum' and 'unsigned long _Accum' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:485
¶unsigned int getLongAlign() const
unsigned int getLongAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:466
¶unsigned int getLongDoubleAlign() const
unsigned int getLongDoubleAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:704
¶const llvm::fltSemantics& getLongDoubleFormat()
const
const llvm::fltSemantics& getLongDoubleFormat()
const
Declared at: clang/include/clang/Basic/TargetInfo.h:705
¶virtual const char* getLongDoubleMangling() const
virtual const char* getLongDoubleMangling() const
Description
Return the mangled code of long double.
Declared at: clang/include/clang/Basic/TargetInfo.h:724
¶unsigned int getLongDoubleWidth() const
unsigned int getLongDoubleWidth() const
Description
getLongDoubleWidth/Align/Format - Return the size/align/format of 'long double'.
Declared at: clang/include/clang/Basic/TargetInfo.h:703
¶unsigned int getLongFractAlign() const
unsigned int getLongFractAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:501
¶unsigned int getLongFractScale() const
unsigned int getLongFractScale() const
Description
getLongFractScale - Return the number of fractional bits in a 'signed long _Fract' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:564
¶unsigned int getLongFractWidth() const
unsigned int getLongFractWidth() const
Description
getLongFractWidth/Align - Return the size of 'signed long _Fract' and 'unsigned long _Fract' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:500
¶unsigned int getLongLongAlign() const
unsigned int getLongLongAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:471
¶unsigned int getLongLongWidth() const
unsigned int getLongLongWidth() const
Description
getLongLongWidth/Align - Return the size of 'signed long long' and 'unsigned long long' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:470
¶unsigned int getLongWidth() const
unsigned int getLongWidth() const
Description
getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:465
¶const char* getMCountName() const
const char* getMCountName() const
Description
Returns the name of the mcount instrumentation function.
Declared at: clang/include/clang/Basic/TargetInfo.h:820
¶unsigned int getMaxAlignedAttribute() const
unsigned int getMaxAlignedAttribute() const
Description
Get the maximum alignment in bits for a static variable with aligned attribute.
Declared at: clang/include/clang/Basic/TargetInfo.h:862
¶unsigned int getMaxAtomicInlineWidth() const
unsigned int getMaxAtomicInlineWidth() const
Description
Return the maximum width lock-free atomic operation which can be inlined given the supported features of the given target.
Declared at: clang/include/clang/Basic/TargetInfo.h:756
¶unsigned int getMaxAtomicPromoteWidth() const
unsigned int getMaxAtomicPromoteWidth() const
Description
Return the maximum width lock-free atomic operation which will ever be supported for the given target
Declared at: clang/include/clang/Basic/TargetInfo.h:753
¶virtual size_t getMaxBitIntWidth() const
virtual size_t getMaxBitIntWidth() const
Declared at: clang/include/clang/Basic/TargetInfo.h:603
¶unsigned int getMaxOpenCLWorkGroupSize() const
unsigned int getMaxOpenCLWorkGroupSize() const
Declared at: clang/include/clang/Basic/TargetInfo.h:777
¶virtual uint64_t getMaxPointerWidth() const
virtual uint64_t getMaxPointerWidth() const
Description
Return the maximum width of pointers on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:433
¶unsigned int getMaxTLSAlign() const
unsigned int getMaxTLSAlign() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:1426
¶unsigned int getMaxVectorAlign() const
unsigned int getMaxVectorAlign() const
Description
Return the maximum vector alignment supported for the given target.
Declared at: clang/include/clang/Basic/TargetInfo.h:771
¶virtual unsigned int getMinGlobalAlign(
uint64_t) const
virtual unsigned int getMinGlobalAlign(
uint64_t) const
Description
getMinGlobalAlign - Return the minimum alignment of a global variable, unless its alignment is explicitly reduced via attributes.
Declared at: clang/include/clang/Basic/TargetInfo.h:655
Parameters
- uint64_t
¶unsigned int getNewAlign() const
unsigned int getNewAlign() const
Description
Return the largest alignment for which a suitably-sized allocation with '::operator new(size_t)' is guaranteed to produce a correctly-aligned pointer.
Declared at: clang/include/clang/Basic/TargetInfo.h:662
¶llvm::StringRef getNormalizedGCCRegisterName(
llvm::StringRef Name,
bool ReturnCanonical = false) const
llvm::StringRef getNormalizedGCCRegisterName(
llvm::StringRef Name,
bool ReturnCanonical = false) const
Description
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".
Declared at: clang/include/clang/Basic/TargetInfo.h:986
Parameters
- llvm::StringRef Name
- bool ReturnCanonical = false
¶virtual uint64_t getNullPointerValue(
clang::LangAS AddrSpace) const
virtual uint64_t getNullPointerValue(
clang::LangAS AddrSpace) const
Description
Get integer value for null pointer.
Declared at: clang/include/clang/Basic/TargetInfo.h:439
Parameters
- clang::LangAS AddrSpace
- address space of pointee in source language.
¶virtual clang::LangAS
getOpenCLBuiltinAddressSpace(
unsigned int AS) const
virtual clang::LangAS
getOpenCLBuiltinAddressSpace(
unsigned int AS) const
Description
Map from the address space field in builtin description strings to the language address space.
Declared at: clang/include/clang/Basic/TargetInfo.h:1465
Parameters
- unsigned int AS
¶virtual clang::LangAS getOpenCLTypeAddrSpace(
clang::OpenCLTypeKind TK) const
virtual clang::LangAS getOpenCLTypeAddrSpace(
clang::OpenCLTypeKind TK) const
Description
Get address space for OpenCL type.
Declared at: clang/include/clang/Basic/TargetInfo.h:1599
Parameters
- clang::OpenCLTypeKind TK
¶llvm::VersionTuple getPlatformMinVersion() const
llvm::VersionTuple getPlatformMinVersion() const
Description
Retrieve the minimum desired version of the platform, to which the program should be compiled.
Declared at: clang/include/clang/Basic/TargetInfo.h:1495
¶llvm::StringRef getPlatformName() const
llvm::StringRef getPlatformName() const
Description
Retrieve the name of the platform as it is used in the availability attribute.
Declared at: clang/include/clang/Basic/TargetInfo.h:1491
¶uint64_t getPointerAlign(
unsigned int AddrSpace) const
uint64_t getPointerAlign(
unsigned int AddrSpace) const
Declared at: clang/include/clang/Basic/TargetInfo.h:428
Parameters
- unsigned int AddrSpace
¶virtual uint64_t getPointerAlignV(
unsigned int AddrSpace) const
virtual uint64_t getPointerAlignV(
unsigned int AddrSpace) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1658
Parameters
- unsigned int AddrSpace
¶uint64_t getPointerWidth(
unsigned int AddrSpace) const
uint64_t getPointerWidth(
unsigned int AddrSpace) const
Description
Return the width of pointers on this target, for the specified address space.
Declared at: clang/include/clang/Basic/TargetInfo.h:425
Parameters
- unsigned int AddrSpace
¶virtual uint64_t getPointerWidthV(
unsigned int AddrSpace) const
virtual uint64_t getPointerWidthV(
unsigned int AddrSpace) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1655
Parameters
- unsigned int AddrSpace
¶clang::TransferrableTargetInfo::IntType
getProcessIDType() const
clang::TransferrableTargetInfo::IntType
getProcessIDType() const
Declared at: clang/include/clang/Basic/TargetInfo.h:367
¶unsigned int getProgramAddressSpace() const
unsigned int getProgramAddressSpace() const
Description
Return the address space for functions for the given target.
Declared at: clang/include/clang/Basic/TargetInfo.h:800
¶clang::TransferrableTargetInfo::IntType
getPtrDiffType(unsigned int AddrSpace) const
clang::TransferrableTargetInfo::IntType
getPtrDiffType(unsigned int AddrSpace) const
Declared at: clang/include/clang/Basic/TargetInfo.h:344
Parameters
- unsigned int AddrSpace
¶virtual enum IntType getPtrDiffTypeV(
unsigned int AddrSpace) const
virtual enum IntType getPtrDiffTypeV(
unsigned int AddrSpace) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1661
Parameters
- unsigned int AddrSpace
¶clang::FloatModeKind getRealTypeByWidth(
unsigned int BitWidth,
clang::FloatModeKind ExplicitType) const
clang::FloatModeKind getRealTypeByWidth(
unsigned int BitWidth,
clang::FloatModeKind ExplicitType) const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:412
Parameters
- unsigned int BitWidth
- clang::FloatModeKind ExplicitType
¶unsigned int getRegParmMax() const
unsigned int getRegParmMax() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1412
¶virtual unsigned int getRegisterWidth() const
virtual unsigned int getRegisterWidth() const
Description
Return the "preferred" register width on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:806
¶const llvm::VersionTuple& getSDKVersion() const
const llvm::VersionTuple& getSDKVersion() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1618
Returns
The version of the SDK which was used during the compilation if one was specified, or an empty version otherwise.
¶unsigned int getShortAccumAlign() const
unsigned int getShortAccumAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:476
¶unsigned int getShortAccumIBits() const
unsigned int getShortAccumIBits() const
Declared at: clang/include/clang/Basic/TargetInfo.h:506
¶unsigned int getShortAccumScale() const
unsigned int getShortAccumScale() const
Description
getShortAccumScale/IBits - Return the number of fractional/integral bits in a 'signed short _Accum' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:505
¶unsigned int getShortAccumWidth() const
unsigned int getShortAccumWidth() const
Description
getShortAccumWidth/Align - Return the size of 'signed short _Accum' and 'unsigned short _Accum' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:475
¶unsigned int getShortAlign() const
unsigned int getShortAlign() const
Description
Return the alignment of 'signed short' and 'unsigned short' for this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:456
¶unsigned int getShortFractAlign() const
unsigned int getShortFractAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:491
¶unsigned int getShortFractScale() const
unsigned int getShortFractScale() const
Description
getShortFractScale - Return the number of fractional bits in a 'signed short _Fract' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:556
¶unsigned int getShortFractWidth() const
unsigned int getShortFractWidth() const
Description
getShortFractWidth/Align - Return the size of 'signed short _Fract' and 'unsigned short _Fract' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:490
¶unsigned int getShortWidth() const
unsigned int getShortWidth() const
Description
Return the size of 'signed short' and 'unsigned short' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:452
¶clang::TransferrableTargetInfo::IntType
getSigAtomicType() const
clang::TransferrableTargetInfo::IntType
getSigAtomicType() const
Declared at: clang/include/clang/Basic/TargetInfo.h:366
¶clang::TransferrableTargetInfo::IntType
getSignedSizeType() const
clang::TransferrableTargetInfo::IntType
getSignedSizeType() const
Declared at: clang/include/clang/Basic/TargetInfo.h:326
¶unsigned int getSimdDefaultAlign() const
unsigned int getSimdDefaultAlign() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:775
¶clang::TransferrableTargetInfo::IntType
getSizeType() const
clang::TransferrableTargetInfo::IntType
getSizeType() const
Declared at: clang/include/clang/Basic/TargetInfo.h:325
¶virtual const char*
getStaticInitSectionSpecifier() const
virtual const char*
getStaticInitSectionSpecifier() const
Description
Return the section to use for C++ static initialization functions.
Declared at: clang/include/clang/Basic/TargetInfo.h:1457
¶unsigned int getSuitableAlign() const
unsigned int getSuitableAlign() const
Description
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).
Declared at: clang/include/clang/Basic/TargetInfo.h:645
¶llvm::StringMap<bool>& getSupportedOpenCLOpts()
llvm::StringMap<bool>& getSupportedOpenCLOpts()
Description
Get supported OpenCL extensions and optional core features.
Declared at: clang/include/clang/Basic/TargetInfo.h:1589
¶const llvm::StringMap<bool>&
getSupportedOpenCLOpts() const
const llvm::StringMap<bool>&
getSupportedOpenCLOpts() const
Description
Get const supported OpenCL extensions and optional core features.
Declared at: clang/include/clang/Basic/TargetInfo.h:1594
¶virtual ArrayRef<Builtin::Info>
getTargetBuiltins() const
virtual ArrayRef<Builtin::Info>
getTargetBuiltins() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:928
¶virtual void getTargetDefines(
const clang::LangOptions& Opts,
clang::MacroBuilder& Builder) const
virtual void getTargetDefines(
const clang::LangOptions& Opts,
clang::MacroBuilder& Builder) const
Description
Appends the target-specific # define values for this target set to the specified buffer.
Declared at: clang/include/clang/Basic/TargetInfo.h:921
Parameters
- const clang::LangOptions& Opts
- clang::MacroBuilder& Builder
¶virtual llvm::Optional<std::string> getTargetID()
const
virtual llvm::Optional<std::string> getTargetID()
const
Description
Returns the target ID if supported.
Declared at: clang/include/clang/Basic/TargetInfo.h:1176
¶clang::TargetOptions& getTargetOpts() const
clang::TargetOptions& getTargetOpts() const
Description
Retrieve the target options.
Declared at: clang/include/clang/Basic/TargetInfo.h:266
¶const llvm::Triple& getTriple() const
const llvm::Triple& getTriple() const
Description
Returns the target triple of the primary target.
Declared at: clang/include/clang/Basic/TargetInfo.h:1171
¶unsigned int getTypeAlign(
clang::TransferrableTargetInfo::IntType T)
const
unsigned int getTypeAlign(
clang::TransferrableTargetInfo::IntType T)
const
Description
Return the alignment (in bits) of the specified integer type enum. For example, SignedInt -> getIntAlign().
Declared at: clang/include/clang/Basic/TargetInfo.h:418
Parameters
- clang::TransferrableTargetInfo::IntType T
¶const char* getTypeConstantSuffix(
clang::TransferrableTargetInfo::IntType T)
const
const char* getTypeConstantSuffix(
clang::TransferrableTargetInfo::IntType T)
const
Description
Return the constant suffix for the specified integer type enum. For example, SignedLong -> "L".
Declared at: clang/include/clang/Basic/TargetInfo.h:883
Parameters
- clang::TransferrableTargetInfo::IntType T
¶static const char* getTypeFormatModifier(
clang::TransferrableTargetInfo::IntType T)
static const char* getTypeFormatModifier(
clang::TransferrableTargetInfo::IntType T)
Description
Return the printf format modifier for the specified integer type enum. For example, SignedLong -> "l".
Declared at: clang/include/clang/Basic/TargetInfo.h:889
Parameters
- clang::TransferrableTargetInfo::IntType T
¶static const char* getTypeName(
clang::TransferrableTargetInfo::IntType T)
static const char* getTypeName(
clang::TransferrableTargetInfo::IntType T)
Description
Return the user string for the specified integer type enum. For example, SignedShort -> "short".
Declared at: clang/include/clang/Basic/TargetInfo.h:878
Parameters
- clang::TransferrableTargetInfo::IntType T
¶unsigned int getTypeWidth(
clang::TransferrableTargetInfo::IntType T)
const
unsigned int getTypeWidth(
clang::TransferrableTargetInfo::IntType T)
const
Description
Return the width (in bits) of the specified integer type enum. For example, SignedInt -> getIntWidth().
Declared at: clang/include/clang/Basic/TargetInfo.h:397
Parameters
- clang::TransferrableTargetInfo::IntType T
¶clang::TransferrableTargetInfo::IntType
getUInt16Type() const
clang::TransferrableTargetInfo::IntType
getUInt16Type() const
Declared at: clang/include/clang/Basic/TargetInfo.h:363
¶clang::TransferrableTargetInfo::IntType
getUInt64Type() const
clang::TransferrableTargetInfo::IntType
getUInt64Type() const
Declared at: clang/include/clang/Basic/TargetInfo.h:359
¶clang::TransferrableTargetInfo::IntType
getUIntMaxType() const
clang::TransferrableTargetInfo::IntType
getUIntMaxType() const
Declared at: clang/include/clang/Basic/TargetInfo.h:341
¶clang::TransferrableTargetInfo::IntType
getUIntPtrType() const
clang::TransferrableTargetInfo::IntType
getUIntPtrType() const
Declared at: clang/include/clang/Basic/TargetInfo.h:351
¶unsigned int getUnsignedAccumIBits() const
unsigned int getUnsignedAccumIBits() const
Declared at: clang/include/clang/Basic/TargetInfo.h:538
¶unsigned int getUnsignedAccumScale() const
unsigned int getUnsignedAccumScale() const
Description
getUnsignedAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned _Accum' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:535
¶unsigned int getUnsignedFractScale() const
unsigned int getUnsignedFractScale() const
Description
getUnsignedFractScale - Return the number of fractional bits in a 'unsigned _Fract' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:575
¶unsigned int getUnsignedLongAccumIBits() const
unsigned int getUnsignedLongAccumIBits() const
Declared at: clang/include/clang/Basic/TargetInfo.h:548
¶unsigned int getUnsignedLongAccumScale() const
unsigned int getUnsignedLongAccumScale() const
Description
getUnsignedLongAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned long _Accum' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:545
¶unsigned int getUnsignedLongFractScale() const
unsigned int getUnsignedLongFractScale() const
Description
getUnsignedLongFractScale - Return the number of fractional bits in a 'unsigned long _Fract' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:581
¶clang::TransferrableTargetInfo::IntType
getUnsignedPtrDiffType(
unsigned int AddrSpace) const
clang::TransferrableTargetInfo::IntType
getUnsignedPtrDiffType(
unsigned int AddrSpace) const
Declared at: clang/include/clang/Basic/TargetInfo.h:347
Parameters
- unsigned int AddrSpace
¶unsigned int getUnsignedShortAccumIBits() const
unsigned int getUnsignedShortAccumIBits() const
Declared at: clang/include/clang/Basic/TargetInfo.h:527
¶unsigned int getUnsignedShortAccumScale() const
unsigned int getUnsignedShortAccumScale() const
Description
getUnsignedShortAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned short _Accum' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:524
¶unsigned int getUnsignedShortFractScale() const
unsigned int getUnsignedShortFractScale() const
Description
getUnsignedShortFractScale - Return the number of fractional bits in a 'unsigned short _Fract' type.
Declared at: clang/include/clang/Basic/TargetInfo.h:568
¶virtual unsigned int getUnwindWordWidth() const
virtual unsigned int getUnwindWordWidth() const
Declared at: clang/include/clang/Basic/TargetInfo.h:803
¶const char* getUserLabelPrefix() const
const char* getUserLabelPrefix() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:817
¶virtual Optional<
std::pair<unsigned int, unsigned int>>
getVScaleRange(
const clang::LangOptions& LangOpts) const
virtual Optional<
std::pair<unsigned int, unsigned int>>
getVScaleRange(
const clang::LangOptions& LangOpts) const
Description
Returns target-specific min and max values VScale_Range.
Declared at: clang/include/clang/Basic/TargetInfo.h:932
Parameters
- const clang::LangOptions& LangOpts
¶virtual unsigned int getVtblPtrAddressSpace()
const
virtual unsigned int getVtblPtrAddressSpace()
const
Declared at: clang/include/clang/Basic/TargetInfo.h:1602
Returns
Target specific vtbl ptr address space.
¶unsigned int getWCharAlign() const
unsigned int getWCharAlign() const
Declared at: clang/include/clang/Basic/TargetInfo.h:669
¶clang::TransferrableTargetInfo::IntType
getWCharType() const
clang::TransferrableTargetInfo::IntType
getWCharType() const
Declared at: clang/include/clang/Basic/TargetInfo.h:354
¶unsigned int getWCharWidth() const
unsigned int getWCharWidth() const
Description
getWCharWidth/Align - Return the size of 'wchar_t' for this target, in bits.
Declared at: clang/include/clang/Basic/TargetInfo.h:668
¶clang::TransferrableTargetInfo::IntType
getWIntType() const
clang::TransferrableTargetInfo::IntType
getWIntType() const
Declared at: clang/include/clang/Basic/TargetInfo.h:355
¶unsigned int getZeroLengthBitfieldBoundary() const
unsigned int getZeroLengthBitfieldBoundary() const
Description
Get the fixed alignment value in bits for a member that follows a zero length bitfield.
Declared at: clang/include/clang/Basic/TargetInfo.h:856
¶virtual llvm::Optional<std::string>
handleAsmEscapedChar(char C) const
virtual llvm::Optional<std::string>
handleAsmEscapedChar(char C) const
Description
Replace some escaped characters with another string based on target-specific rules
Declared at: clang/include/clang/Basic/TargetInfo.h:1157
Parameters
- char C
¶virtual bool handleTargetFeatures(
std::vector<std::string>& Features,
clang::DiagnosticsEngine& Diags)
virtual bool handleTargetFeatures(
std::vector<std::string>& Features,
clang::DiagnosticsEngine& Diags)
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:1346
Parameters
- std::vector<std::string>& Features
- clang::DiagnosticsEngine& Diags
Returns
False on error.
¶bool hasAArch64SVETypes() const
bool hasAArch64SVETypes() const
Description
Returns whether or not the AArch64 SVE built-in types are available on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:955
¶bool hasAlignMac68kSupport() const
bool hasAlignMac68kSupport() const
Description
Check whether this target support ' # pragma options align=mac68k'.
Declared at: clang/include/clang/Basic/TargetInfo.h:871
¶virtual bool hasBFloat16Type() const
virtual bool hasBFloat16Type() const
Description
Determine whether the _BFloat16 type is supported on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:627
¶virtual bool hasBitIntType() const
virtual bool hasBitIntType() const
Description
Determine whether the _BitInt type is supported on this target. This limitation is put into place for ABI reasons. FIXME: _BitInt is a required type in C23, so there's not much utility in asking whether the target supported it or not; I think this should be removed once backends have been alerted to the type and have had the chance to do implementation work if needed.
Declared at: clang/include/clang/Basic/TargetInfo.h:597
¶virtual bool hasBuiltinAtomic(
uint64_t AtomicSizeInBits,
uint64_t AlignmentInBits) const
virtual bool hasBuiltinAtomic(
uint64_t AtomicSizeInBits,
uint64_t AlignmentInBits) const
Description
Returns true if the given target supports lock-free atomic operations at the specified width and alignment.
Declared at: clang/include/clang/Basic/TargetInfo.h:762
Parameters
- uint64_t AtomicSizeInBits
- uint64_t AlignmentInBits
¶bool hasBuiltinMSVaList() const
bool hasBuiltinMSVaList() const
Description
Returns whether or not type \c __builtin_ms_va_list type is available on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:948
¶virtual bool hasFPReturn() const
virtual bool hasFPReturn() const
Description
Determine whether return of a floating point value is supported on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:637
¶virtual bool hasFeature(
llvm::StringRef Feature) const
virtual bool hasFeature(
llvm::StringRef Feature) const
Description
Determine whether the given target has the given feature.
Declared at: clang/include/clang/Basic/TargetInfo.h:1352
Parameters
- llvm::StringRef Feature
¶virtual bool hasFeatureEnabled(
const llvm::StringMap<bool>& Features,
llvm::StringRef Name) const
virtual bool hasFeatureEnabled(
const llvm::StringMap<bool>& Features,
llvm::StringRef Name) const
Description
Check if target has a given feature enabled
Declared at: clang/include/clang/Basic/TargetInfo.h:1294
Parameters
- const llvm::StringMap<bool>& Features
- llvm::StringRef Name
¶virtual bool hasFloat128Type() const
virtual bool hasFloat128Type() const
Description
Determine whether the __float128 type is supported on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:621
¶virtual bool hasFloat16Type() const
virtual bool hasFloat16Type() const
Description
Determine whether the _Float16 type is supported on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:624
¶virtual bool hasIbm128Type() const
virtual bool hasIbm128Type() const
Description
Determine whether the __ibm128 type is supported on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:630
¶virtual bool hasInt128Type() const
virtual bool hasInt128Type() const
Description
Determine whether the __int128 type is supported on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:587
¶virtual bool hasLegalHalfType() const
virtual bool hasLegalHalfType() const
Description
Determine whether _Float16 is supported on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:618
¶virtual bool hasLongDoubleType() const
virtual bool hasLongDoubleType() const
Description
Determine whether the long double type is supported on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:633
¶bool hasNoAsmVariants() const
bool hasNoAsmVariants() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:1444
¶virtual bool hasPS4DLLImportExport() const
virtual bool hasPS4DLLImportExport() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1213
¶virtual bool hasProtectedVisibility() const
virtual bool hasProtectedVisibility() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:1203
¶bool hasRISCVVTypes() const
bool hasRISCVVTypes() const
Description
Returns whether or not the RISC-V V built-in types are available on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:959
¶virtual bool hasSjLjLowering() const
virtual bool hasSjLjLowering() const
Description
Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp.
Declared at: clang/include/clang/Basic/TargetInfo.h:1545
¶virtual bool hasStrictFP() const
virtual bool hasStrictFP() const
Description
Determine whether constrained floating point is supported on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:640
¶virtual bool initFeatureMap(
llvm::StringMap<bool>& Features,
clang::DiagnosticsEngine& Diags,
llvm::StringRef CPU,
const std::vector<std::string>& FeatureVec)
const
virtual bool initFeatureMap(
llvm::StringMap<bool>& Features,
clang::DiagnosticsEngine& Diags,
llvm::StringRef CPU,
const std::vector<std::string>& FeatureVec)
const
Description
Initialize the map with the default set of target features for the CPU this should include all legal feature strings on the target.
Declared at: clang/include/clang/Basic/TargetInfo.h:1236
Parameters
- llvm::StringMap<bool>& Features
- clang::DiagnosticsEngine& Diags
- llvm::StringRef CPU
- const std::vector<std::string>& FeatureVec
Returns
False on error (invalid features).
¶bool isBigEndian() const
bool isBigEndian() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1497
¶virtual bool isBranchProtectionSupportedArch(
llvm::StringRef Arch) const
virtual bool isBranchProtectionSupportedArch(
llvm::StringRef Arch) const
Description
Determine if the Architecture in this TargetInfo supports branch protection
Declared at: clang/include/clang/Basic/TargetInfo.h:1322
Parameters
- llvm::StringRef Arch
¶virtual bool isCLZForZeroUndef() const
virtual bool isCLZForZeroUndef() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:940
¶bool isLittleEndian() const
bool isLittleEndian() const
Declared at: clang/include/clang/Basic/TargetInfo.h:1498
¶virtual bool isNan2008() const
virtual bool isNan2008() const
Description
Returns true if NaN encoding is IEEE 754-2008. Only MIPS allows a different encoding.
Declared at: clang/include/clang/Basic/TargetInfo.h:1166
¶bool isRenderScriptTarget() const
bool isRenderScriptTarget() const
Description
Returns true for RenderScript.
Declared at: clang/include/clang/Basic/TargetInfo.h:951
¶bool isSEHTrySupported() const
bool isSEHTrySupported() const
Description
Whether the target supports SEH __try.
Declared at: clang/include/clang/Basic/TargetInfo.h:1432
¶virtual bool isSPRegName(llvm::StringRef) const
virtual bool isSPRegName(llvm::StringRef) const
Declared at: clang/include/clang/Basic/TargetInfo.h:989
Parameters
¶bool isTLSSupported() const
bool isTLSSupported() const
Description
Whether the target supports thread-local storage.
Declared at: clang/include/clang/Basic/TargetInfo.h:1418
¶static bool isTypeSigned(
clang::TransferrableTargetInfo::IntType T)
static bool isTypeSigned(
clang::TransferrableTargetInfo::IntType T)
Description
Returns true if the type is signed; false otherwise.
Declared at: clang/include/clang/Basic/TargetInfo.h:421
Parameters
- clang::TransferrableTargetInfo::IntType T
¶bool isVLASupported() const
bool isVLASupported() const
Description
Whether target supports variable-length arrays.
Declared at: clang/include/clang/Basic/TargetInfo.h:1429
¶virtual bool isValidCPUName(
llvm::StringRef Name) const
virtual bool isValidCPUName(
llvm::StringRef Name) const
Description
brief Determine whether this TargetInfo supports the given CPU name.
Declared at: clang/include/clang/Basic/TargetInfo.h:1264
Parameters
- llvm::StringRef Name
¶bool isValidClobber(llvm::StringRef Name) const
bool isValidClobber(llvm::StringRef Name) const
Description
Returns whether the passed in string is a valid clobber in an inline asm statement. This is used by Sema.
Declared at: clang/include/clang/Basic/TargetInfo.h:973
Parameters
- llvm::StringRef Name
¶virtual bool isValidFeatureName(
llvm::StringRef Feature) const
virtual bool isValidFeatureName(
llvm::StringRef Feature) const
Description
Determine whether this TargetInfo supports the given feature.
Declared at: clang/include/clang/Basic/TargetInfo.h:1308
Parameters
- llvm::StringRef Feature
¶virtual bool isValidGCCRegisterName(
llvm::StringRef Name) const
virtual bool isValidGCCRegisterName(
llvm::StringRef Name) const
Description
Returns whether the passed in string is a valid register name according to GCC. This is used by Sema for inline asm statements.
Declared at: clang/include/clang/Basic/TargetInfo.h:979
Parameters
- llvm::StringRef Name
¶virtual bool isValidTuneCPUName(
llvm::StringRef Name) const
virtual bool isValidTuneCPUName(
llvm::StringRef Name) const
Description
brief Determine whether this TargetInfo supports the given CPU name for
Declared at: clang/include/clang/Basic/TargetInfo.h:1270
Parameters
- llvm::StringRef Name
¶virtual unsigned int multiVersionSortPriority(
llvm::StringRef Name) const
virtual unsigned int multiVersionSortPriority(
llvm::StringRef Name) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1371
Parameters
- llvm::StringRef Name
¶void noSignedCharForObjCBool()
void noSignedCharForObjCBool()
Declared at: clang/include/clang/Basic/TargetInfo.h:832
¶void resetDataLayout(
llvm::StringRef DL,
const char* UserLabelPrefix = "")
void resetDataLayout(
llvm::StringRef DL,
const char* UserLabelPrefix = "")
Declared at: clang/include/clang/Basic/TargetInfo.h:251
Parameters
- llvm::StringRef DL
- const char* UserLabelPrefix = ""
¶bool resolveSymbolicName(
const char*& Name,
ArrayRef<clang::TargetInfo::ConstraintInfo>
OutputConstraints,
unsigned int& Index) const
bool resolveSymbolicName(
const char*& Name,
ArrayRef<clang::TargetInfo::ConstraintInfo>
OutputConstraints,
unsigned int& Index) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1141
Parameters
- const char*& Name
- ArrayRef<clang::TargetInfo::ConstraintInfo> OutputConstraints
- unsigned int& Index
¶virtual bool setABI(const std::string& Name)
virtual bool setABI(const std::string& Name)
Description
Use the specified ABI.
Declared at: clang/include/clang/Basic/TargetInfo.h:1282
Parameters
- const std::string& Name
Returns
False on error (invalid ABI name).
¶virtual void setAuxTarget(
const clang::TargetInfo* Aux)
virtual void setAuxTarget(
const clang::TargetInfo* Aux)
Declared at: clang/include/clang/Basic/TargetInfo.h:1632
Parameters
- const clang::TargetInfo* Aux
¶virtual bool setCPU(const std::string& Name)
virtual bool setCPU(const std::string& Name)
Description
Target the specified CPU.
Declared at: clang/include/clang/Basic/TargetInfo.h:1251
Parameters
- const std::string& Name
Returns
False on error (invalid CPU name).
¶virtual void setCommandLineOpenCLOpts()
virtual void setCommandLineOpenCLOpts()
Description
Set supported OpenCL extensions as written on command line
Declared at: clang/include/clang/Basic/TargetInfo.h:1573
¶virtual bool setFPMath(llvm::StringRef Name)
virtual bool setFPMath(llvm::StringRef Name)
Description
Use the specified unit for FP math.
Declared at: clang/include/clang/Basic/TargetInfo.h:1289
Parameters
- llvm::StringRef Name
Returns
False on error (invalid unit name).
¶virtual void setFeatureEnabled(
llvm::StringMap<bool>& Features,
llvm::StringRef Name,
bool Enabled) const
virtual void setFeatureEnabled(
llvm::StringMap<bool>& Features,
llvm::StringRef Name,
bool Enabled) const
Description
Enable or disable a specific target feature; the feature name must be valid.
Declared at: clang/include/clang/Basic/TargetInfo.h:1301
Parameters
- llvm::StringMap<bool>& Features
- llvm::StringRef Name
- bool Enabled
¶virtual void setMaxAtomicWidth()
virtual void setMaxAtomicWidth()
Description
Set the maximum inline or promote width lock-free atomic operation for the given target.
Declared at: clang/include/clang/Basic/TargetInfo.h:759
¶virtual void setSupportedOpenCLOpts()
virtual void setSupportedOpenCLOpts()
Description
Set supported OpenCL extensions and optional core features.
Declared at: clang/include/clang/Basic/TargetInfo.h:1564
¶virtual bool shouldDLLImportComdatSymbols() const
virtual bool shouldDLLImportComdatSymbols() const
Description
Does this target aim for semantic compatibility with Microsoft C++ code using dllimport/export attributes?
Declared at: clang/include/clang/Basic/TargetInfo.h:1207
¶virtual void supportAllOpenCLOpts(bool V = true)
virtual void supportAllOpenCLOpts(bool V = true)
Declared at: clang/include/clang/Basic/TargetInfo.h:1566
Parameters
- bool V = true
¶virtual bool supportSourceEvalMethod() const
virtual bool supportSourceEvalMethod() const
Declared at: clang/include/clang/Basic/TargetInfo.h:744
¶virtual bool supportsExtendIntArgs() const
virtual bool supportsExtendIntArgs() const
Description
Whether the option -fextend-arguments={32,64} is supported on the target.
Declared at: clang/include/clang/Basic/TargetInfo.h:1501
¶bool supportsIFunc() const
bool supportsIFunc() const
Description
Identify whether this target supports IFuncs.
Declared at: clang/include/clang/Basic/TargetInfo.h:1361
¶bool supportsMultiVersioning() const
bool supportsMultiVersioning() const
Description
Identify whether this target supports multiversioning of functions, which requires support for cpu_supports and cpu_is functionality.
Declared at: clang/include/clang/Basic/TargetInfo.h:1358
¶virtual bool supportsTargetAttributeTune() const
virtual bool supportsTargetAttributeTune() const
Description
brief Determine whether this TargetInfo supports tune in target attribute.
Declared at: clang/include/clang/Basic/TargetInfo.h:1275
¶bool useAddressSpaceMapMangling() const
bool useAddressSpaceMapMangling() const
Description
Specify if mangling based on address space map should be used or not for language specific address spaces
Declared at: clang/include/clang/Basic/TargetInfo.h:913
¶bool useBitFieldTypeAlignment() const
bool useBitFieldTypeAlignment() const
Description
Check whether the alignment of bit-field types is respected when laying out structures.
Declared at: clang/include/clang/Basic/TargetInfo.h:838
¶bool useExplicitBitFieldAlignment() const
bool useExplicitBitFieldAlignment() const
Declared at: clang/include/clang/Basic/TargetInfo.h:866
¶virtual bool useFP16ConversionIntrinsics() const
virtual bool useFP16ConversionIntrinsics() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:907
¶bool useLeadingZeroLengthBitfield() const
bool useLeadingZeroLengthBitfield() const
Description
Check whether zero length bitfield alignment is respected if they are leading members.
Declared at: clang/include/clang/Basic/TargetInfo.h:850
¶bool useObjCFP2RetForComplexLongDouble() const
bool useObjCFP2RetForComplexLongDouble() const
Description
Check whether _Complex long double should use the "fp2ret" flavor of Objective-C message passing on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:899
¶bool useObjCFPRetForRealType(
clang::FloatModeKind T) const
bool useObjCFPRetForRealType(
clang::FloatModeKind T) const
Description
Check whether the given real type should use the "fpret" flavor of Objective-C message passing on this target.
Declared at: clang/include/clang/Basic/TargetInfo.h:893
Parameters
- clang::FloatModeKind T
¶bool useSignedCharForObjCBool() const
bool useSignedCharForObjCBool() const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:829
¶bool useZeroLengthBitfieldAlignment() const
bool useZeroLengthBitfieldAlignment() const
Description
Check whether zero length bitfields should force alignment of the next member.
Declared at: clang/include/clang/Basic/TargetInfo.h:844
¶virtual bool validateAsmConstraint(
const char*& Name,
TargetInfo::ConstraintInfo& info) const
virtual bool validateAsmConstraint(
const char*& Name,
TargetInfo::ConstraintInfo& info) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1138
Parameters
- const char*& Name
- TargetInfo::ConstraintInfo& info
¶virtual bool validateBranchProtection(
llvm::StringRef Spec,
llvm::StringRef Arch,
clang::TargetInfo::BranchProtectionInfo& BPI,
llvm::StringRef& Err) const
virtual bool validateBranchProtection(
llvm::StringRef Spec,
llvm::StringRef Arch,
clang::TargetInfo::BranchProtectionInfo& BPI,
llvm::StringRef& Err) const
Description
Determine if this TargetInfo supports the given branch protection specification
Declared at: clang/include/clang/Basic/TargetInfo.h:1328
Parameters
- llvm::StringRef Spec
- llvm::StringRef Arch
- clang::TargetInfo::BranchProtectionInfo& BPI
- llvm::StringRef& Err
¶virtual bool validateCPUSpecificCPUDispatch(
llvm::StringRef Name) const
virtual bool validateCPUSpecificCPUDispatch(
llvm::StringRef Name) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1381
Parameters
- llvm::StringRef Name
¶virtual bool validateConstraintModifier(
llvm::StringRef,
char,
unsigned int,
std::string&) const
virtual bool validateConstraintModifier(
llvm::StringRef,
char,
unsigned int,
std::string&) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1131
Parameters
- llvm::StringRef
- char
- unsigned int
- std::string&
¶virtual bool validateCpuIs(
llvm::StringRef Name) const
virtual bool validateCpuIs(
llvm::StringRef Name) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1377
Parameters
- llvm::StringRef Name
¶virtual bool validateCpuSupports(
llvm::StringRef Name) const
virtual bool validateCpuSupports(
llvm::StringRef Name) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1367
Parameters
- llvm::StringRef Name
¶virtual bool validateGlobalRegisterVariable(
llvm::StringRef RegName,
unsigned int RegSize,
bool& HasSizeMismatch) const
virtual bool validateGlobalRegisterVariable(
llvm::StringRef RegName,
unsigned int RegSize,
bool& HasSizeMismatch) const
Description
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.
Declared at: clang/include/clang/Basic/TargetInfo.h:1105
Parameters
- llvm::StringRef RegName
- unsigned int RegSize
- bool& HasSizeMismatch
¶bool validateInputConstraint(
MutableArrayRef<
clang::TargetInfo::ConstraintInfo>
OutputConstraints,
clang::TargetInfo::ConstraintInfo& info) const
bool validateInputConstraint(
MutableArrayRef<
clang::TargetInfo::ConstraintInfo>
OutputConstraints,
clang::TargetInfo::ConstraintInfo& info) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1116
Parameters
- MutableArrayRef<clang::TargetInfo::ConstraintInfo> OutputConstraints
- clang::TargetInfo::ConstraintInfo& info
¶virtual bool validateInputSize(
const llvm::StringMap<bool>& FeatureMap,
llvm::StringRef,
unsigned int) const
virtual bool validateInputSize(
const llvm::StringMap<bool>& FeatureMap,
llvm::StringRef,
unsigned int) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1125
Parameters
- const llvm::StringMap<bool>& FeatureMap
- llvm::StringRef
- unsigned int
¶virtual bool validateOpenCLTarget(
const clang::LangOptions& Opts,
clang::DiagnosticsEngine& Diags) const
virtual bool validateOpenCLTarget(
const clang::LangOptions& Opts,
clang::DiagnosticsEngine& Diags) const
Description
Check that OpenCL target has valid options setting based on OpenCL version.
Declared at: clang/include/clang/Basic/TargetInfo.h:1629
Parameters
- const clang::LangOptions& Opts
- clang::DiagnosticsEngine& Diags
¶bool validateOutputConstraint(
clang::TargetInfo::ConstraintInfo& Info) const
bool validateOutputConstraint(
clang::TargetInfo::ConstraintInfo& Info) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1115
Parameters
¶virtual bool validateOutputSize(
const llvm::StringMap<bool>& FeatureMap,
llvm::StringRef,
unsigned int) const
virtual bool validateOutputSize(
const llvm::StringMap<bool>& FeatureMap,
llvm::StringRef,
unsigned int) const
Declared at: clang/include/clang/Basic/TargetInfo.h:1119
Parameters
- const llvm::StringMap<bool>& FeatureMap
- llvm::StringRef
- unsigned int
¶virtual bool validateTarget(
clang::DiagnosticsEngine& Diags) const
virtual bool validateTarget(
clang::DiagnosticsEngine& Diags) const
Description
Check the target is valid after it is fully initialized.
Declared at: clang/include/clang/Basic/TargetInfo.h:1623
Parameters
- clang::DiagnosticsEngine& Diags
¶virtual ~TargetInfo()
virtual ~TargetInfo()
Declared at: clang/include/clang/Basic/TargetInfo.h:263