[clang] Handle __declspec() attributes in using
[llvm-project.git] / compiler-rt / lib / xray / xray_trampoline_powerpc64.cpp
blob878c46930fee6892c662ca041d6135e0af97a66c
1 #include <atomic>
2 #include <xray/xray_interface.h>
4 namespace __xray {
6 extern std::atomic<void (*)(int32_t, XRayEntryType)> XRayPatchedFunction;
8 // Implement this in C++ instead of assembly, to avoid dealing with ToC by hand.
9 void CallXRayPatchedFunction(int32_t FuncId, XRayEntryType Type) {
10 auto fptr = __xray::XRayPatchedFunction.load();
11 if (fptr != nullptr)
12 (*fptr)(FuncId, Type);
15 } // namespace __xray