I'm trying to use __cyg_profile_func_*
with -finstrument-functions
to do specific checks before and after functions run (eg, to check for Mach port leaks and such). This is on OS X.
The code is written and functional, but I have a ton of undefined references to, for example,
std::__1::basic_ios<wchar_t, std::__1::char_traits<wchar_t> >::init(std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >*)
It seems like perhaps some sort of inlining is taking place, but the instrumentation is still trying to reference a non-inlined version of the function. Is it possible to exempt the standard C++ library from instrumentation? Or, possible to completely disable inlining in clang for this particular circumstance?
Cheers!