#include #include namespace __xray { extern std::atomic XRayPatchedFunction; // Implement this in C++ instead of assembly, to avoid dealing with ToC by hand. void CallXRayPatchedFunction(int32_t FuncId, XRayEntryType Type) { auto fptr = __xray::XRayPatchedFunction.load(); if (fptr != nullptr) (*fptr)(FuncId, Type); } } // namespace __xray