Commit 655a0a9f authored by Ryan Pavlik's avatar Ryan Pavlik
Browse files

include: Add XRT_DEBUGBREAK to xrt_cmmpiler.h

parent fab78645
......@@ -42,3 +42,14 @@
#else
#define XRT_MAYBE_UNUSED
#endif
/*!
* @define XRT_DEBUGBREAK()
* To trigger a trap/break in the debugger.
*/
#if defined(__clang__) || defined(__GNUC__)
#define XRT_DEBUGBREAK() __builtin_trap()
#elif defined(_MSC_VER)
#include <intrin.h>
#define XRT_DEBUGBREAK() __debugbreak()
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment