diff --git a/llvm/include/llvm/TargetParser/Triple.h b/llvm/include/llvm/TargetParser/Triple.h --- a/llvm/include/llvm/TargetParser/Triple.h +++ b/llvm/include/llvm/TargetParser/Triple.h @@ -939,6 +939,11 @@ 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() ||