minix/sys/external/bsd/compiler_rt/dist/lib/eprintf.c
Lionel Sambuc 4684ddb6aa LLVM Minix changes
- import libcxx
 - reduce targets to the one when compiled as a tools

Change-Id: Iabb8427f80ff8e89463559a28bcb8b4f2bdbc496
2014-07-28 17:05:59 +02:00

32 lines
905 B
C

/* ===---------- eprintf.c - Implements __eprintf --------------------------===
*
* The LLVM Compiler Infrastructure
*
* This file is dual licensed under the MIT and the University of Illinois Open
* Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*/
#include "int_lib.h"
#include <stdio.h>
/*
* __eprintf() was used in an old version of <assert.h>.
* It can eventually go away, but it is needed when linking
* .o files built with the old <assert.h>.
*
* It should never be exported from a dylib, so it is marked
* visibility hidden.
*/
__attribute__((visibility("hidden")))
void __eprintf(const char* format, const char* assertion_expression,
const char* line, const char* file)
{
fprintf(stderr, format, assertion_expression, line, file);
fflush(stderr);
compilerrt_abort();
}