1214152Sed/* ===---------- eprintf.c - Implements __eprintf --------------------------=== 2214152Sed * 3214152Sed * The LLVM Compiler Infrastructure 4214152Sed * 5222656Sed * This file is dual licensed under the MIT and the University of Illinois Open 6222656Sed * Source Licenses. See LICENSE.TXT for details. 7214152Sed * 8214152Sed * ===----------------------------------------------------------------------=== 9214152Sed */ 10214152Sed 11214152Sed 12214152Sed 13214152Sed#include "int_lib.h" 14214152Sed#include <stdio.h> 15214152Sed 16214152Sed 17214152Sed/* 18214152Sed * __eprintf() was used in an old version of <assert.h>. 19214152Sed * It can eventually go away, but it is needed when linking 20214152Sed * .o files built with the old <assert.h>. 21214152Sed * 22214152Sed * It should never be exported from a dylib, so it is marked 23214152Sed * visibility hidden. 24214152Sed */ 25214152Sed__attribute__((visibility("hidden"))) 26214152Sedvoid __eprintf(const char* format, const char* assertion_expression, 27214152Sed const char* line, const char* file) 28214152Sed{ 29214152Sed fprintf(stderr, format, assertion_expression, line, file); 30214152Sed fflush(stderr); 31214152Sed compilerrt_abort(); 32214152Sed} 33