5c4c99b4abc76a60b2e129d239db0c11b290ebb9
[libfirm] / ir / common / panic.c
1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
3 **
4 ** Authors: Martin Trapp, Christian Schaefer
5 **
6 */
7
8 #ifdef HAVE_CONFIG_H
9 # include <config.h>
10 #endif
11
12 # include "panic.h"
13 # include "xprintf.h"
14
15 void
16 panic (const char *fmt, ...)
17 {
18   va_list ap;
19
20   fputs ("(panic) ", stderr);
21   va_start (ap, fmt);
22   xvfprintf (stderr, fmt, ap);
23   va_end (ap);
24   putc ('\n', stderr);
25   exit (1);
26 }