forked from OSchip/llvm-project
[OpenMP][libomp] Replace accidental VLA with KMP_ALLOCA
MSVC does not support variable length arrays. Replace with KMP_ALLOCA which is already used in the same file for stack-allocated variables.
This commit is contained in:
parent
6f17768e11
commit
6be7c21b57
|
@ -948,7 +948,7 @@ bool kmp_topology_t::filter_hw_subset() {
|
|||
bool using_core_effs = false;
|
||||
int hw_subset_depth = __kmp_hw_subset->get_depth();
|
||||
kmp_hw_t specified[KMP_HW_LAST];
|
||||
int topology_levels[hw_subset_depth];
|
||||
int *topology_levels = (int *)KMP_ALLOCA(sizeof(int) * hw_subset_depth);
|
||||
KMP_ASSERT(hw_subset_depth > 0);
|
||||
KMP_FOREACH_HW_TYPE(i) { specified[i] = KMP_HW_UNKNOWN; }
|
||||
int core_level = get_level(KMP_HW_CORE);
|
||||
|
|
Loading…
Reference in New Issue