[OpenMP] Fix `present` diagnostic for array extension
authorJoel E. Denny <jdenny.ornl@gmail.com>
Wed, 5 Aug 2020 20:47:29 +0000 (16:47 -0400)
committerJoel E. Denny <jdenny.ornl@gmail.com>
Wed, 5 Aug 2020 20:51:24 +0000 (16:51 -0400)
commit41b1aefecb9447620dd182b0352abed0df05665c
tree3a6f306385ef973c1a33e930fb0d3038288b4b95
parentf3b41502554f2948ad00531dde7c3f53973de960
[OpenMP] Fix `present` diagnostic for array extension

For example, without this patch, the following fails as expected with
or without the `present` modifier, but the `present` modifier doesn't
produce its usual diagnostic:

```
 #pragma omp target data map(alloc: arr[0:2])
 {
   #pragma omp target map(present, tofrom: arr[0:100]) // not fully present
   ;
 }
```

Reviewed By: grokos, vzakhari

Differential Revision: https://reviews.llvm.org/D85320
openmp/libomptarget/src/device.cpp
openmp/libomptarget/test/mapping/present/target_array_extension.c [new file with mode: 0644]
openmp/libomptarget/test/mapping/present/target_data_array_extension.c [new file with mode: 0644]