2022-06-06 10:49:19 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#if defined(_MSC_VER) && !defined(__clang__)
|
|
|
|
#define _compiler_msvc
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__GNUC__) && !defined(__clang__)
|
|
|
|
#define _compiler_gnu
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__clang__)
|
|
|
|
#define _compiler_clang
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__CUIKC__)
|
|
|
|
#define _compiler_cuik
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !(defined(_compiler_msvc) \
|
|
|
|
|| defined(_compiler_gnu) \
|
|
|
|
|| defined(_compiler_cuik) \
|
|
|
|
|| defined(_compiler_clang))
|
|
|
|
#error "Unsupported Compiler"
|
|
|
|
#endif
|
|
|
|
|
2022-06-08 01:46:36 +00:00
|
|
|
#if defined(_compiler_msvc) || defined(_compiler_cuik)
|
2022-06-06 10:49:19 +00:00
|
|
|
#include <intrin.h>
|
|
|
|
#define _compiler_brk __debugbreak
|
|
|
|
#elif defined(_compiler_gcc) || defined(_compiler_clang)
|
|
|
|
#define _compiler_brk __builtin_trap
|
|
|
|
#else
|
|
|
|
#error "_compiler_brk is not implemented for this compiler"
|
|
|
|
#endif
|
|
|
|
|
2022-06-08 01:46:36 +00:00
|
|
|
#define _compiler_curfunc __FUNCTION__
|