[libomptarget] Handle offload policy in push_tripcount
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Tue, 23 Jul 2019 14:20:48 +0000 (14:20 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Tue, 23 Jul 2019 14:20:48 +0000 (14:20 +0000)
commit6e40ae8f3d3f794cfca624e52994e410438506a6
tree0c07c0c7f35dceeebd0bd7ca868021c3b5a776cd
parent57e87dd81beb8df988bfa8e3369a2c7a888da093
[libomptarget] Handle offload policy in push_tripcount

If the first target region in a program calls the push_tripcount
function, libomptarget didn't handle the offload policy correctly.
This could lead to unexpected error messages as seen in
http://lists.llvm.org/pipermail/openmp-dev/2019-June/002561.html

To solve this, add a check calling IsOffloadDisabled() as all other
entry points already do. If this method returns false, libomptarget
is effectively disabled.

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

llvm-svn: 366810
openmp/libomptarget/src/interface.cpp