[Openmp-commits] [openmp] 6b9a79f - Move variable declarations out of #if guard, NFC
Krzysztof Parzyszek via Openmp-commits
openmp-commits at lists.llvm.org
Sun Nov 13 10:54:45 PST 2022
Author: Krzysztof Parzyszek
Date: 2022-11-13T12:54:03-06:00
New Revision: 6b9a79f9a2b47c1246faa218ee2496bdb6fa298a
URL: https://github.com/llvm/llvm-project/commit/6b9a79f9a2b47c1246faa218ee2496bdb6fa298a
DIFF: https://github.com/llvm/llvm-project/commit/6b9a79f9a2b47c1246faa218ee2496bdb6fa298a.diff
LOG: Move variable declarations out of #if guard, NFC
They are used in other sides of the #if/#else.
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 21771e6ef4bcf..7aa704b0a49b0 100644
--- a/openmp/runtime/src/z_Linux_util.cpp
+++ b/openmp/runtime/src/z_Linux_util.cpp
@@ -131,13 +131,14 @@ void __kmp_affinity_determine_capable(const char *env_var) {
#define KMP_CPU_SET_SIZE_LIMIT (sizeof(cpuset_t))
#endif
+ int verbose = __kmp_affinity.flags.verbose;
+ int warnings = __kmp_affinity.flags.warnings;
+ enum affinity_type type = __kmp_affinity.type;
+
#if KMP_OS_LINUX
long gCode;
unsigned char *buf;
buf = (unsigned char *)KMP_INTERNAL_MALLOC(KMP_CPU_SET_SIZE_LIMIT);
- int verbose = __kmp_affinity.flags.verbose;
- int warnings = __kmp_affinity.flags.warnings;
- enum affinity_type type = __kmp_affinity.type;
// If the syscall returns a suggestion for the size,
// then we don't have to search for an appropriate size.
More information about the Openmp-commits
mailing list