Skip using this[:1] map info for non-member variable.
authorJennifer Yu <jennifer.yu@intel.com>
Thu, 23 Feb 2023 03:57:30 +0000 (19:57 -0800)
committerJennifer Yu <jennifer.yu@intel.com>
Thu, 23 Feb 2023 17:27:56 +0000 (09:27 -0800)
commit1b72a32762436aad1b7064a8d44681300fd8e380
tree800103fab1a3fe0b1b767c8b88ebac3fb8a90c8d
parentc080c1f4821274dbb358f6a6911055d9d8b6dbed
Skip using this[:1] map info for non-member variable.

This fix runtime problem due to generate this[:1] map info for non member
variable.
To fix this check VD, if VD is not null, it is not member from current
or base classes.

Differential Revision: https://reviews.llvm.org/D144616
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/test/OpenMP/target_map_member_expr_codegen.cpp
openmp/libomptarget/test/mapping/target_map_for_member_data.cpp