[OMPT] Make sure that OMPT is enabled when accessing internals of the runtime
authorJoachim Protze <protze@itc.rwth-aachen.de>
Wed, 30 Jan 2019 08:41:06 +0000 (08:41 +0000)
committerJoachim Protze <protze@itc.rwth-aachen.de>
Wed, 30 Jan 2019 08:41:06 +0000 (08:41 +0000)
commit32959e683a0096aa842b43be19f987af976668ff
treefe9dc3ce9854bcb0268e7a552ae4b8e7b7a6f2e2
parent3a901b47ba00fc38c65f31bf66605d0e4fd40c93
[OMPT] Make sure that OMPT is enabled when accessing internals of the runtime

Redo after revert by hans. The wrong include in one test is fixed.

Make sure that OMPT is enabled in runtime entry points that access internals
of the runtime. Else, return an appropiate value indicating an error or that
the data is not available.

Patch provided by @sconvent

Reviewers: jlpeyton, omalyshe, hbae, Hahnfeld, joachim.protze

Reviewed By: joachim.protze

Tags: #openmp, #ompt

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

llvm-svn: 352611
openmp/runtime/src/ompt-general.cpp
openmp/runtime/test/ompt/misc/api_calls_without_ompt.c [new file with mode: 0644]