[OpenMP] Fixed possible array out of bound access
[OpenMP] Fixed possible array out of bound access

There is low probability that array th_hot_teams can be
accessed out of bound (when many nested levels are requested
to keep hot teams via KMP_HOT_TEAMS_MAX_LEVEL). The patch
adds the check of index that fixes the problem.

Patch by Andrey Churbanov

Differential Revision: https://reviews.llvm.org/D54950


git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@347800 91177308-0d34-0410-b5e6-96231b3b80d8

llvm-mirror/openmp,llvm-mirror/openmp,llvm-mirror/openmp,llvm-mirror/openmp,llvm-mirror/openmp