Adds a utility method llvm::Triple::isBPF() aggregating Triple::bpfel
and Triple::bpfeb architectures. Similar to other predicates in this class.
Differential Revision: https://reviews.llvm.org/D140969
return Env == Triple::GNUX32 || Env == Triple::MuslX32;
}
+ /// Tests whether the target is eBPF.
+ bool isBPF() const {
+ return getArch() == Triple::bpfel || getArch() == Triple::bpfeb;
+ }
+
/// Tests whether the target supports comdat
bool supportsCOMDAT() const {
return !(isOSBinFormatMachO() || isOSBinFormatXCOFF() ||