[OMPT] Fix test tasks/serialized.c with optimization
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Fri, 23 Feb 2018 16:46:11 +0000 (16:46 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Fri, 23 Feb 2018 16:46:11 +0000 (16:46 +0000)
commit5e440698571f64545f8f8f4107f18e20e6f9d9b6
tree9104733cf6f840e976b762dd75aa9392c18612c6
parentfba2044e73946d6b2c11d4cda7be22d3cdaaa43f
[OMPT] Fix test tasks/serialized.c with optimization

The compiler inlines the user code in the task. Check for that case at
runtime by comparing the frame addresses and print the expected exit
address.

Also showcase how I think the OMPT tests could be reformatted to match
LLVM's code style. In my opinion it would be great to that kind of change
to all tests that need to be touched for whatever reason...

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

llvm-svn: 325921
openmp/runtime/test/ompt/callback.h
openmp/runtime/test/ompt/tasks/serialized.c