[PATCH] D153938: [llvm-exegesis] Adjust GLIBC_INITS_RSEQ condition
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 27 21:57:08 PDT 2023
MaskRay updated this revision to Diff 535234.
MaskRay added a comment.
drop Compiler.h. For linux, gcc (2014) / clang have supported __has_include for very long time.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153938/new/
https://reviews.llvm.org/D153938
Files:
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
Index: llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
===================================================================
--- llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
@@ -38,16 +38,13 @@
#include <sys/wait.h>
#include <unistd.h>
-#ifdef __GLIBC__
-#if __GLIBC_MINOR__ >= 35
-#define GLIBC_INITS_RSEQ
-#endif // __GLIBC__MINOR > 35
-#endif // __GLIBC__
-
-#ifdef GLIBC_INITS_RSEQ
+#if defined(__GLIBC__) && __has_include(<sys/rseq.h>)
#include <sys/rseq.h>
-#endif // HAS_RSEQ
-#endif // __linux__
+#ifdef RSEQ_SIG
+#define GLIBC_INITS_RSEQ
+#endif
+#endif
+#endif
namespace llvm {
namespace exegesis {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153938.535234.patch
Type: text/x-patch
Size: 674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230628/ac4cad14/attachment.bin>
More information about the llvm-commits
mailing list