blob: 56d6c18fbd5de3f883b49ac94035dcd37fc38350 [file] [log] [blame]
Daniel Dunbarb3a69012009-06-26 16:47:03 +00001//===---------- eprintf.c - Implements __eprintf --------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10
11
12#include <stdio.h>
13#include <stdlib.h>
14
15
16//
17// __eprintf() was used in an old version of <assert.h>.
18// It can eventually go away, but it is needed when linking
19// .o files built with the old <assert.h>.
20//
21// It should never be exported from a dylib, so it is marked
22// visibility hidden.
23//
24__attribute__((visibility("hidden")))
25void __eprintf(const char* format, const char* assertion_expression,
26 const char* line, const char* file)
27{
28 fprintf(stderr, format, assertion_expression, line, file);
29 fflush(stderr);
30 abort();
31}