14 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_WEBASSEMBLY_H 15 #define LLVM_CLANG_LIB_BASIC_TARGETS_WEBASSEMBLY_H 19 #include "llvm/ADT/Triple.h" 20 #include "llvm/Support/Compiler.h" 33 bool HasNontrappingFPToInt;
40 LargeArrayMinWidth = 128;
41 LargeArrayAlign = 128;
42 SimdDefaultAlign = 128;
43 SigAtomicType = SignedLong;
44 LongDoubleWidth = LongDoubleAlign = 128;
45 LongDoubleFormat = &llvm::APFloat::IEEEquad();
46 SizeType = UnsignedInt;
47 PtrDiffType = SignedInt;
48 IntPtrType = SignedInt;
59 const std::vector<std::string> &FeaturesVec)
const override {
60 if (CPU ==
"bleeding-edge") {
61 Features[
"simd128"] =
true;
62 Features[
"nontrapping-fptoint"] =
true;
67 bool hasFeature(StringRef Feature)
const final;
69 bool handleTargetFeatures(std::vector<std::string> &Features,
72 bool isValidCPUName(StringRef Name)
const final;
74 bool setCPU(
const std::string &Name)
final {
return isValidCPUName(Name); }
79 return VoidPtrBuiltinVaList;
88 bool validateAsmConstraint(
const char *&Name,
93 const char *getClobbers()
const final {
return ""; }
95 bool isCLZForZeroUndef()
const final {
return false; }
97 bool hasInt128Type()
const final {
return true; }
99 IntType getIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
101 return BitWidth == 64 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
105 IntType getLeastIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
107 return BitWidth == 64
108 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
118 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
119 resetDataLayout(
"e-m:e-p:32:32-i64:64-n32:64-S128");
133 LongAlign = LongWidth = 64;
134 PointerAlign = PointerWidth = 64;
135 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
136 SizeType = UnsignedLong;
137 PtrDiffType = SignedLong;
138 IntPtrType = SignedLong;
139 resetDataLayout(
"e-m:e-p:64:64-i64:64-n32:64-S128");
148 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_WEBASSEMBLY_H static const Builtin::Info BuiltinInfo[]
virtual IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return the smallest integer type with at least the specified width.
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...
Options for controlling the target.
WebAssembly64TargetInfo(const llvm::Triple &T, const TargetOptions &Opts)
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Concrete class used by the front-end to report problems and issues.
WebAssemblyTargetInfo(const llvm::Triple &T, const TargetOptions &)
Exposes information about the current target.
virtual bool initFeatureMap(llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeatureVec) const
Initialize the map with the default set of target features for the CPU this should include all legal ...
const FunctionProtoType * T
Defines the clang::TargetOptions class.
IntType
===-— Target Data Type Query Methods ----------------------------—===//
Dataflow Directional Tag Classes.
virtual IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return integer type with specified width.
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
WebAssembly32TargetInfo(const llvm::Triple &T, const TargetOptions &Opts)
Defines the clang::TargetInfo interface.