blob: 17d77223c348d25a045d083b2545a3aa3d81a3d5 [file] [log] [blame]
Daniel Dunbar2b88e032011-11-16 01:19:19 +00001/* ===-- int_util.h - internal utility functions ----------------------------===
2 *
3 * The LLVM Compiler Infrastructure
4 *
5 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details.
7 *
8 * ===-----------------------------------------------------------------------===
9 *
10 * This file is not part of the interface of this library.
11 *
12 * This file defines non-inline utilities which are available for use in the
13 * library. The function definitions themselves are all contained in int_util.c
14 * which will always be compiled into any compiler-rt library.
15 *
16 * ===-----------------------------------------------------------------------===
17 */
18
19#ifndef INT_UTIL_H
20#define INT_UTIL_H
21
22/** \brief Trigger a program abort (or panic for kernel code). */
23#define compilerrt_abort() compilerrt_abort_impl(__FILE__, __LINE__, \
24 __FUNCTION__)
25void compilerrt_abort_impl(const char *file, int line,
26 const char *function)
Daniel Dunbare2ed5fb2011-11-29 19:44:14 +000027#ifndef KERNEL_USE
28 __attribute__((weak))
29#endif
Daniel Dunbar2b88e032011-11-16 01:19:19 +000030 __attribute__((noreturn)) __attribute__((visibility("hidden")));
31
32#endif /* INT_UTIL_H */