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;
130 static void setSIMDLevel(llvm::StringMap<bool> &Features, SIMDEnum Level,
136 const std::vector<std::string> &FeaturesVec)
const override;
139 void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
140 bool Enabled)
const final;
142 bool handleTargetFeatures(std::vector<std::string> &Features,
145 bool isValidCPUName(StringRef Name)
const final;
148 bool setCPU(StringRef Name)
final {
return isValidCPUName(Name); }
152 BuiltinVaListKind getBuiltinVaListKind() const final {
153 return VoidPtrBuiltinVaList;
158 ArrayRef<TargetInfo::GCCRegAlias> getGCCRegAliases() const final {
162 bool validateAsmConstraint(
const char *&Name,
163 TargetInfo::ConstraintInfo &Info)
const final {
167 std::string_view getClobbers() const final {
return ""; }
169 bool isCLZForZeroUndef() const final {
return false; }
171 bool hasInt128Type() const final {
return true; }
173 IntType getIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
175 return BitWidth == 64 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
176 : TargetInfo::getIntTypeByWidth(BitWidth, IsSigned);
179 IntType getLeastIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
181 return BitWidth == 64
182 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
183 : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
186 CallingConvCheckResult checkCallingConvention(CallingConv CC)
const override {
192 return HasTailCall ? CCCR_OK : CCCR_Error;
198 bool hasBitIntType()
const override {
return true; }
200 bool hasProtectedVisibility()
const override {
return false; }
202 void adjust(DiagnosticsEngine &Diags, LangOptions &Opts,
203 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.