1*0a6a1f1dSLionel Sambuc /* ===-- int_util.h - internal utility functions ----------------------------=== 2*0a6a1f1dSLionel Sambuc * 3*0a6a1f1dSLionel Sambuc * The LLVM Compiler Infrastructure 4*0a6a1f1dSLionel Sambuc * 5*0a6a1f1dSLionel Sambuc * This file is dual licensed under the MIT and the University of Illinois Open 6*0a6a1f1dSLionel Sambuc * Source Licenses. See LICENSE.TXT for details. 7*0a6a1f1dSLionel Sambuc * 8*0a6a1f1dSLionel Sambuc * ===-----------------------------------------------------------------------=== 9*0a6a1f1dSLionel Sambuc * 10*0a6a1f1dSLionel Sambuc * This file is not part of the interface of this library. 11*0a6a1f1dSLionel Sambuc * 12*0a6a1f1dSLionel Sambuc * This file defines non-inline utilities which are available for use in the 13*0a6a1f1dSLionel Sambuc * library. The function definitions themselves are all contained in int_util.c 14*0a6a1f1dSLionel Sambuc * which will always be compiled into any compiler-rt library. 15*0a6a1f1dSLionel Sambuc * 16*0a6a1f1dSLionel Sambuc * ===-----------------------------------------------------------------------=== 17*0a6a1f1dSLionel Sambuc */ 18*0a6a1f1dSLionel Sambuc 19*0a6a1f1dSLionel Sambuc #ifndef INT_UTIL_H 20*0a6a1f1dSLionel Sambuc #define INT_UTIL_H 21*0a6a1f1dSLionel Sambuc 22*0a6a1f1dSLionel Sambuc /** \brief Trigger a program abort (or panic for kernel code). */ 23*0a6a1f1dSLionel Sambuc #define compilerrt_abort() compilerrt_abort_impl(__FILE__, __LINE__, \ 24*0a6a1f1dSLionel Sambuc __func__) 25*0a6a1f1dSLionel Sambuc 26*0a6a1f1dSLionel Sambuc void compilerrt_abort_impl(const char *file, int line, 27*0a6a1f1dSLionel Sambuc const char *function) __attribute__((noreturn)); 28*0a6a1f1dSLionel Sambuc 29*0a6a1f1dSLionel Sambuc #endif /* INT_UTIL_H */ 30