include: Add XRT_DEBUGBREAK to xrt_cmmpiler.h

This commit is contained in:
Ryan Pavlik 2019-04-08 14:18:43 -05:00 committed by Jakob Bornecrantz
parent 891eb7f1c4
commit b7b27cc5a0

View file

@ -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