libFirm
irprintf.h File Reference

A little printf understanding some firm types. More...

#include <stddef.h>
#include <stdarg.h>
#include <stdio.h>
#include "begin.h"
#include "end.h"

Go to the source code of this file.

Functions

void ir_printf (const char *fmt,...)
 A string formatting routine for ir objects.
void ir_fprintf (FILE *f, const char *fmt,...)
void ir_snprintf (char *buf, size_t n, const char *fmt,...)
void ir_vprintf (const char *fmt, va_list args)
void ir_vfprintf (FILE *f, const char *fmt, va_list args)
void ir_vsnprintf (char *buf, size_t len, const char *fmt, va_list args)
void ir_obst_vprintf (struct obstack *obst, const char *fmt, va_list args)

Detailed Description

A little printf understanding some firm types.

Author
Sebastian Hack
Date
29.11.2004

Definition in file irprintf.h.

Function Documentation

void ir_fprintf ( FILE *  f,
const char *  fmt,
  ... 
)
See Also
ir_printf.
void ir_obst_vprintf ( struct obstack *  obst,
const char *  fmt,
va_list  args 
)
See Also
ir_printf.
void ir_printf ( const char *  fmt,
  ... 
)

A string formatting routine for ir objects.

Parameters
fmtThe format string.

This function rudimentary implements a kind of printf(3) for ir nodes and adds the following additional conversion specifiers.

  • %t A type name.
  • %e An entity name.
  • %E An entity ld name.
  • %T A tarval.
  • %n A full description of a node.
  • %O The opcode name of an ir node.
  • %N The node number of an ir node.
  • %m The mode name of an ir mode.
  • %B The block node number of the nodes block.
  • %I An ident.
  • %D Print as many white spaces as given in the parameter.
  • %G A debug info (if available) from the given ir node.
  • %B A bitset.
  • %F A Firm object (automatically detected).

Note that some of the standard format capabilities are not available due to this new conversion specifiers, use lc_printf() if needed.

void ir_snprintf ( char *  buf,
size_t  n,
const char *  fmt,
  ... 
)
See Also
ir_printf.
void ir_vfprintf ( FILE *  f,
const char *  fmt,
va_list  args 
)
See Also
ir_printf.
void ir_vprintf ( const char *  fmt,
va_list  args 
)
See Also
ir_printf.
void ir_vsnprintf ( char *  buf,
size_t  len,
const char *  fmt,
va_list  args 
)
See Also
ir_printf.