[Openmp-commits] [openmp] 90a9e9f - [OpenMP] Fix a condition for KMP_OS_SOLARIS. (#71831)

via Openmp-commits openmp-commits at lists.llvm.org
Thu Nov 9 10:30:40 PST 2023


Author: xingxue-ibm
Date: 2023-11-09T13:30:36-05:00
New Revision: 90a9e9f638073f46a36e0fda44948bc74da5f641

URL: https://github.com/llvm/llvm-project/commit/90a9e9f638073f46a36e0fda44948bc74da5f641
DIFF: https://github.com/llvm/llvm-project/commit/90a9e9f638073f46a36e0fda44948bc74da5f641.diff

LOG: [OpenMP] Fix a condition for KMP_OS_SOLARIS. (#71831)

Line 75 of `z_Linux_util.cpp` checks `#ifdef KMP_OS_SOLARIS` which is
always true regardless of the building platform because macro
`KMP_OS_SOLARIS` is always defined in line 23 of `kmp_platform.h`:
`define KMP_OS_SOLARIS 0`.

Added: 
    

Modified: 
    openmp/runtime/src/z_Linux_util.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/z_Linux_util.cpp b/openmp/runtime/src/z_Linux_util.cpp
index e17bed2a4f76614..9e1a7c7736298db 100644
--- a/openmp/runtime/src/z_Linux_util.cpp
+++ b/openmp/runtime/src/z_Linux_util.cpp
@@ -72,7 +72,7 @@ struct kmp_sys_timer {
   struct timespec start;
 };
 
-#ifdef KMP_OS_SOLARIS
+#if KMP_OS_SOLARIS
 // Convert timeval to timespec.
 #define TIMEVAL_TO_TIMESPEC(tv, ts)                                            \
   do {                                                                         \


        


More information about the Openmp-commits mailing list