becopyopt: Inline the thin wrapper nodes_interfere(), so we do not need to fetch...
[libfirm] / include / libfirm / irio.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief   Input/Output textual representation of firm.
9  * @author  Moritz Kroll
10  */
11 #ifndef FIRM_IR_IRIO_H
12 #define FIRM_IR_IRIO_H
13
14 #include <stdio.h>
15
16 #include "firm_types.h"
17 #include "begin.h"
18
19 /**
20  * @defgroup irio Input and Output
21  * @note The file format is not considered stable yet. So expect
22  *       incompatibilities between file formats of different libfirm versions.
23  * @{
24  */
25
26 /**
27  * Exports the whole irp to the given file in a textual form.
28  * Exports all types, all ir graphs, and the constant graph.
29  *
30  * @param filename  the name of the resulting file
31  * @return  0 if no errors occured, other values in case of errors
32  */
33 FIRM_API int ir_export(const char *filename);
34
35 /**
36  * same as ir_export but writes to a FILE*
37  * @note As with any FILE* errors are indicated by ferror(output)
38  */
39 FIRM_API void ir_export_file(FILE *output);
40
41 /**
42  * Imports the data stored in the given file.
43  * Imports any type graphs and ir graphs contained in the file.
44  *
45  * @param filename  the name of the file
46  * @returns 0 if no errors occured, other values in case of errors
47  */
48 FIRM_API int ir_import(const char *filename);
49
50 /**
51  * same as ir_import but imports from a FILE*
52  */
53 FIRM_API int ir_import_file(FILE *input, const char *inputname);
54
55 /** @} */
56
57 #include "end.h"
58
59 #endif