[clang] [Clang] Add selftest for macro __BPF_FEATURE_ATOMIC_MEM_ORDERING (PR #188675)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 25 21:30:55 PDT 2026
https://github.com/yonghong-song created https://github.com/llvm/llvm-project/pull/188675
Add selftest for macro __BPF_FEATURE_ATOMIC_MEM_ORDERING as the pull request [1] missed the test.
[1] https://github.com/llvm/llvm-project/pull/107343
>From 1723ef2d85e951b1c484f940dd8cf13b62b25066 Mon Sep 17 00:00:00 2001
From: Yonghong Song <yonghong.song at linux.dev>
Date: Wed, 25 Mar 2026 21:22:27 -0700
Subject: [PATCH] [Clang] Add selftest for macro
__BPF_FEATURE_ATOMIC_MEM_ORDERING
Add selftest for macro __BPF_FEATURE_ATOMIC_MEM_ORDERING as
the pull request [1] missed the test.
[1] https://github.com/llvm/llvm-project/pull/107343
---
clang/test/Preprocessor/bpf-predefined-macros.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/clang/test/Preprocessor/bpf-predefined-macros.c b/clang/test/Preprocessor/bpf-predefined-macros.c
index a9ae8c58c3ba7..b4e37fdd7de37 100644
--- a/clang/test/Preprocessor/bpf-predefined-macros.c
+++ b/clang/test/Preprocessor/bpf-predefined-macros.c
@@ -73,6 +73,9 @@ int v;
#ifdef __BPF_FEATURE_GOTOX
int w;
#endif
+#ifdef __BPF_FEATURE_ATOMIC_MEM_ORDERING
+int x;
+#endif
// CHECK: int b;
// CHECK: int c;
@@ -115,6 +118,11 @@ int w;
// CPU_V4: int v;
// CPU_V4: int w;
+// CPU_V1: int x;
+// CPU_V2: int x;
+// CPU_V3: int x;
+// CPU_V4: int x;
+
// CPU_GENERIC: int g;
// CPU_PROBE: int f;
More information about the cfe-commits
mailing list