Description
Heya 👋
We're currently looking into integrating a prototype developed by @sebastiankreutzer and @pauladelmann, which enables the usage of XRay for compiler instrumentation in the performance measurement infrastructure Score-P. The prototype so far uses C++, but we are looking to port it to C, as this prevents some issues we might run into down the line. A lot of work in that direction is already done, but we noticed an issue with xray_interface.h
.
xray_interface.h
includes two headers:
llvm-project/compiler-rt/include/xray/xray_interface.h
Lines 17 to 18 in 7e7871d
Both headers are C++ heades, not compatible with C. A bit further down, we see std::size_t
being used:
These issues seem to exist since XRay was introduced. Probably no tool tried to use this with C...
Fixing this should be straight-forward, replacing #include <cstddef>
with #include <stddef.h>
, #include <cstdint>
with #include <stdint.h>
and std::size_t
with size_t
.
But maybe we want to introduce a test to make sure that this header stays C compliant?