[PATCH] D140969: [BPF] Triple::isBPF() utility method
Yonghong Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 22:37:45 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5702202ad666: [BPF] Triple::isBPF() utility method (authored by eddyz87, committed by yonghong-song).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140969/new/
https://reviews.llvm.org/D140969
Files:
llvm/include/llvm/TargetParser/Triple.h
Index: llvm/include/llvm/TargetParser/Triple.h
===================================================================
--- llvm/include/llvm/TargetParser/Triple.h
+++ 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() ||
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140969.487050.patch
Type: text/x-patch
Size: 577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230107/e1a06095/attachment.bin>
More information about the llvm-commits
mailing list