int_util.c revision 401f693a874c0f2fd9e37173e3ab7045a1bdeb3d
1/* ===-- 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 33