blob: 2dc4d2ee9269f01ca254c8484744b6afcb0392c2 [file] [log] [blame]
Daniel Dunbar2b88e032011-11-16 01:19:19 +00001/* ===-- int_util.c - Implement internal utilities --------------------------===
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
11#include "int_util.h"
12#include "int_lib.h"
13
14#ifdef KERNEL_USE
15
16extern void panic(const char *, ...) __attribute__((noreturn));
17__attribute__((visibility("hidden")))
18void compilerrt_abort_impl(const char *file, int line, const char *function) {
19 panic("%s:%d: abort in %s", file, line, function);
20}
21
22#else
23
24/* Get the system definition of abort() */
25#include <stdlib.h>
26
27__attribute__((visibility("hidden")))
28void compilerrt_abort_impl(const char *file, int line, const char *function) {
29 abort();
30}
31
32#endif