diff options
author | Nico Weber <nicolasweber@gmx.de> | 2019-08-01 12:30:58 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2019-08-01 12:30:58 +0000 |
commit | b301860321208253065e5dc74200cfc68f9cf87a (patch) | |
tree | 39edd5e9dd14bb8f03909ae20e7122c30bdfc1f1 /compiler-rt/lib/xray/xray_trampoline_powerpc64.cpp | |
parent | 0c50319927b5fac90fa73d4f0cfcd817875b77cc (diff) | |
download | bcm5719-llvm-b301860321208253065e5dc74200cfc68f9cf87a.tar.gz bcm5719-llvm-b301860321208253065e5dc74200cfc68f9cf87a.zip |
compiler-rt: Rename .cc file in lib/xray to .cpp
Like r367463, but for xray.
llvm-svn: 367546
Diffstat (limited to 'compiler-rt/lib/xray/xray_trampoline_powerpc64.cpp')
-rw-r--r-- | compiler-rt/lib/xray/xray_trampoline_powerpc64.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler-rt/lib/xray/xray_trampoline_powerpc64.cpp b/compiler-rt/lib/xray/xray_trampoline_powerpc64.cpp new file mode 100644 index 00000000000..878c46930fe --- /dev/null +++ b/compiler-rt/lib/xray/xray_trampoline_powerpc64.cpp @@ -0,0 +1,15 @@ +#include <atomic> +#include <xray/xray_interface.h> + +namespace __xray { + +extern std::atomic<void (*)(int32_t, XRayEntryType)> 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 |