libFirm
Input and Output

Functions

int ir_export (const char *filename)
 Exports the whole irp to the given file in a textual form. More...
 
void ir_export_file (FILE *output)
 same as ir_export but writes to a FILE* More...
 
int ir_import (const char *filename)
 Imports the data stored in the given file. More...
 
int ir_import_file (FILE *input, const char *inputname)
 same as ir_import but imports from a FILE* More...
 

Detailed Description

Note
The file format is not considered stable yet. So expect incompatibilities between file formats of different libfirm versions.

Function Documentation

int ir_export ( const char *  filename)

Exports the whole irp to the given file in a textual form.

Exports all types, all ir graphs, and the constant graph.

Parameters
filenamethe name of the resulting file
Returns
0 if no errors occured, other values in case of errors
void ir_export_file ( FILE *  output)

same as ir_export but writes to a FILE*

Note
As with any FILE* errors are indicated by ferror(output)
int ir_import ( const char *  filename)

Imports the data stored in the given file.

Imports any type graphs and ir graphs contained in the file.

Parameters
filenamethe name of the file
Returns
0 if no errors occured, other values in case of errors
int ir_import_file ( FILE *  input,
const char *  inputname 
)

same as ir_import but imports from a FILE*