Path: blob/master/libs/compiler-rt/lib/builtins/int_util.h
4395 views
/* ===-- int_util.h - internal utility functions ----------------------------===1*2* The LLVM Compiler Infrastructure3*4* This file is dual licensed under the MIT and the University of Illinois Open5* Source Licenses. See LICENSE.TXT for details.6*7* ===-----------------------------------------------------------------------===8*9* This file is not part of the interface of this library.10*11* This file defines non-inline utilities which are available for use in the12* library. The function definitions themselves are all contained in int_util.c13* which will always be compiled into any compiler-rt library.14*15* ===-----------------------------------------------------------------------===16*/1718#ifndef INT_UTIL_H19#define INT_UTIL_H2021/** \brief Trigger a program abort (or panic for kernel code). */22#define compilerrt_abort() __compilerrt_abort_impl(__FILE__, __LINE__, __func__)2324NORETURN void __compilerrt_abort_impl(const char *file, int line,25const char *function);2627#define COMPILE_TIME_ASSERT(expr) COMPILE_TIME_ASSERT1(expr, __COUNTER__)28#define COMPILE_TIME_ASSERT1(expr, cnt) COMPILE_TIME_ASSERT2(expr, cnt)29#define COMPILE_TIME_ASSERT2(expr, cnt) \30typedef char ct_assert_##cnt[(expr) ? 1 : -1] UNUSED3132#endif /* INT_UTIL_H */333435