14 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_BPF_H 15 #define LLVM_CLANG_LIB_BASIC_TARGETS_BPF_H 19 #include "llvm/ADT/Triple.h" 20 #include "llvm/Support/Compiler.h" 29 LongWidth = LongAlign = PointerWidth = PointerAlign = 64;
30 SizeType = UnsignedLong;
31 PtrDiffType = SignedLong;
32 IntPtrType = SignedLong;
33 IntMaxType = SignedLong;
34 Int64Type = SignedLong;
36 if (Triple.getArch() == llvm::Triple::bpfeb) {
37 resetDataLayout(
"E-m:e-p:64:64-i64:64-n32:64-S128");
39 resetDataLayout(
"e-m:e-p:64:64-i64:64-n32:64-S128");
41 MaxAtomicPromoteWidth = 64;
42 MaxAtomicInlineWidth = 64;
49 bool hasFeature(StringRef Feature)
const override {
return Feature ==
"bpf"; }
81 if (Name ==
"generic" || Name ==
"v1" ||
82 Name ==
"v2" || Name ==
"probe")
87 bool setCPU(
const std::string &Name)
override {
88 StringRef CPUName(Name);
89 return isValidCPUName(CPUName);
94 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_BPF_H
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
Options for controlling the target.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
bool hasFeature(StringRef Feature) const override
Determine whether the given target has the given feature.
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
typedef void* __builtin_va_list;
Exposes information about the current target.
BPFTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
CallingConv
CallingConv - Specifies the calling convention that a function uses.
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const override
Defines the clang::TargetOptions class.
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
ArrayRef< const char * > getGCCRegNames() const override
Dataflow Directional Tag Classes.
const char * getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
Defines the clang::TargetInfo interface.
bool isValidCPUName(StringRef Name) const override
brief Determine whether this TargetInfo supports the given CPU name.
bool setCPU(const std::string &Name) override
Target the specified CPU.