summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2019-09-04 17:47:37 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2019-09-04 17:47:37 +0000
commit673e5476a817e93440e4b269df8bcb0d4b8aae14 (patch)
tree6c33c0ca2d2210f55b1ffb4c5430fbba59fd433d /openmp/runtime/src
parent3a49ca331fa2ac8d3d7bc231ea2b671588ad476a (diff)
downloadbcm5719-llvm-673e5476a817e93440e4b269df8bcb0d4b8aae14.tar.gz
bcm5719-llvm-673e5476a817e93440e4b269df8bcb0d4b8aae14.zip
[OpenMP] Change initialization of __kmp_global
There's no need to initialize variables with static storage duration because they're implicitly initialized to zero. See https://en.cppreference.com/w/c/language/initialization#Implicit_initialization I think that's already relied upon because the supplied 0 only sets 'kmp_time_global_t g_time;' in 'struct kmp_base_global'. The other fields are not set in the code, but implicitly initialized by the compiler. Differential Revision: https://reviews.llvm.org/D66292 llvm-svn: 370943
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/kmp_global.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_global.cpp b/openmp/runtime/src/kmp_global.cpp
index 1ec73b82e99..6e636dc394e 100644
--- a/openmp/runtime/src/kmp_global.cpp
+++ b/openmp/runtime/src/kmp_global.cpp
@@ -431,7 +431,7 @@ std::atomic<int> __kmp_thread_pool_active_nth = ATOMIC_VAR_INIT(0);
/* -------------------------------------------------
* GLOBAL/ROOT STATE */
KMP_ALIGN_CACHE
-kmp_global_t __kmp_global = {{0}};
+kmp_global_t __kmp_global;
/* ----------------------------------------------- */
/* GLOBAL SYNCHRONIZATION LOCKS */
OpenPOWER on IntegriCloud