36 bool HasAtomics =
false;
37 bool HasBulkMemory =
false;
38 bool HasBulkMemoryOpt =
false;
39 bool HasCallIndirectOverlong =
false;
40 bool HasCooperativeThreading =
false;
41 bool HasCompactImports =
false;
42 bool HasExceptionHandling =
false;
43 bool HasExtendedConst =
false;
46 bool HasLibcallThreadContext =
false;
47 bool HasMultiMemory =
false;
48 bool HasMultivalue =
false;
49 bool HasMutableGlobals =
false;
50 bool HasNontrappingFPToInt =
false;
51 bool HasReferenceTypes =
false;
52 bool HasRelaxedAtomics =
false;
53 bool HasSignExt =
false;
54 bool HasTailCall =
false;
55 bool HasWideArithmetic =
false;
89 if (
T.getOS() == llvm::Triple::WASIp3) {
90 HasLibcallThreadContext =
true;
91 HasCooperativeThreading =
true;
95 StringRef getABI()
const override;
96 bool setABI(
const std::string &Name)
override;
103 static void setSIMDLevel(llvm::StringMap<bool> &Features, SIMDEnum Level,
109 const std::vector<std::string> &FeaturesVec)
const override;
112 void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
113 bool Enabled)
const final;
115 bool handleTargetFeatures(std::vector<std::string> &Features,
118 bool isValidCPUName(StringRef Name)
const final;
121 bool setCPU(StringRef Name)
final {
return isValidCPUName(Name); }
125 BuiltinVaListKind getBuiltinVaListKind() const final {
126 return VoidPtrBuiltinVaList;
131 ArrayRef<TargetInfo::GCCRegAlias> getGCCRegAliases() const final {
135 bool validateAsmConstraint(
const char *&Name,
136 TargetInfo::ConstraintInfo &Info)
const final {
140 std::string_view getClobbers() const final {
return ""; }
142 bool isCLZForZeroUndef() const final {
return false; }
144 bool hasInt128Type() const final {
return true; }
146 IntType getIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
148 return BitWidth == 64 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
149 : TargetInfo::getIntTypeByWidth(BitWidth, IsSigned);
152 IntType getLeastIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
154 return BitWidth == 64
155 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
156 : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
159 CallingConvCheckResult checkCallingConvention(CallingConv CC)
const override {
165 return HasTailCall ? CCCR_OK : CCCR_Error;
171 bool hasBitIntType()
const override {
return true; }
173 bool hasProtectedVisibility()
const override {
return false; }
175 void adjust(DiagnosticsEngine &Diags, LangOptions &Opts,
176 const TargetInfo *Aux)
override;
static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, const TargetInfo &Target)
Determine whether a translation unit built using the current language options has the given feature.