62 bool HasAtomics =
false;
63 bool HasBulkMemory =
false;
64 bool HasBulkMemoryOpt =
false;
65 bool HasCallIndirectOverlong =
false;
66 bool HasCooperativeThreading =
false;
67 bool HasCompactImports =
false;
68 bool HasExceptionHandling =
false;
69 bool HasExtendedConst =
false;
72 bool HasLibcallThreadContext =
false;
73 bool HasMultiMemory =
false;
74 bool HasMultivalue =
false;
75 bool HasMutableGlobals =
false;
76 bool HasNontrappingFPToInt =
false;
77 bool HasReferenceTypes =
false;
78 bool HasRelaxedAtomics =
false;
79 bool HasSignExt =
false;
80 bool HasTailCall =
false;
81 bool HasWideArithmetic =
false;
115 if (T.getOS() == llvm::Triple::WASIp3) {
116 HasLibcallThreadContext =
true;
117 HasCooperativeThreading =
true;
121 StringRef getABI()
const override;
122 bool setABI(
const std::string &Name)
override;
129 static void setSIMDLevel(llvm::StringMap<bool> &Features, SIMDEnum Level,
135 const std::vector<std::string> &FeaturesVec)
const override;
138 void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
139 bool Enabled)
const final;
141 bool handleTargetFeatures(std::vector<std::string> &Features,
144 bool isValidCPUName(StringRef Name)
const final;
147 bool setCPU(StringRef Name)
final {
return isValidCPUName(Name); }
151 BuiltinVaListKind getBuiltinVaListKind() const final {
152 return VoidPtrBuiltinVaList;
157 ArrayRef<TargetInfo::GCCRegAlias> getGCCRegAliases() const final {
161 bool validateAsmConstraint(
const char *&Name,
162 TargetInfo::ConstraintInfo &Info)
const final {
166 std::string_view getClobbers() const final {
return ""; }
168 bool isCLZForZeroUndef() const final {
return false; }
170 bool hasInt128Type() const final {
return true; }
172 IntType getIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
174 return BitWidth == 64 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
175 : TargetInfo::getIntTypeByWidth(BitWidth, IsSigned);
178 IntType getLeastIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
180 return BitWidth == 64
181 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
182 : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
185 CallingConvCheckResult checkCallingConvention(CallingConv CC)
const override {
191 return HasTailCall ? CCCR_OK : CCCR_Error;
197 bool hasBitIntType()
const override {
return true; }
199 bool hasProtectedVisibility()
const override {
return false; }
201 void adjust(DiagnosticsEngine &Diags, LangOptions &Opts,
202 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.