beloopana: Remove duplicate comments.
[libfirm] / ir / common / error.c
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief     Error handling for libFirm
9  * @author    Michael Beck
10  */
11 #include "config.h"
12
13 #include <stdlib.h>
14
15 #include <stdio.h>
16 #include <stdarg.h>
17 #include "error.h"
18 #include "irprintf.h"
19
20 NORETURN (panic)(char const *const file, int const line, char const *const func, char const *const fmt, ...)
21 {
22         va_list ap;
23
24         fprintf(stderr, "%s:%d: libFirm panic in %s: ", file, line, func);
25         va_start(ap, fmt);
26         ir_vfprintf(stderr, fmt, ap);
27         va_end(ap);
28         putc('\n', stderr);
29         abort();
30 }