Fix OMP_TARGET_OFFLOAD parsing
authorHansang Bae <hansang.bae@intel.com>
Thu, 30 May 2019 18:35:07 +0000 (18:35 +0000)
committerHansang Bae <hansang.bae@intel.com>
Thu, 30 May 2019 18:35:07 +0000 (18:35 +0000)
commitec1b4d1f6fb0fe0c11ef4532db0c657067baf14c
tree30ffbf8e1f3668e54e3285cda5119702b536c17b
parent778e445c58c52d5b23aafe89855b93a00eac46e5
Fix OMP_TARGET_OFFLOAD parsing

Current parsing allows trailing string after the permitted value,
MANDATORY|DISABLED|DEFAULT -- e.g., "mandatorynot" is also recognized
as "MANDATORY". Such cases should be recognized as incorrect/unknown
value.

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

llvm-svn: 362125
openmp/runtime/src/kmp_settings.cpp
openmp/runtime/test/env/omp_target_offload.c [new file with mode: 0644]