[PATCH] D140969: [BPF] Triple::isBPF() utility method
Eduard Zingerman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 13:14:37 PST 2023
eddyz87 updated this revision to Diff 486975.
eddyz87 added a comment.
Just a rebase.
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.486975.patch
Type: text/x-patch
Size: 577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230106/8b0dfc42/attachment.bin>
More information about the llvm-commits
mailing list