GCC Middle and Back End API Reference
streamer_hooks Struct Reference

#include <streamer-hooks.h>

Data Fields

void(* write_tree )(struct output_block *, tree, bool, bool)
tree(* read_tree )(struct lto_input_block *, struct data_in *)
location_t(* input_location )(struct bitpack_d *, struct data_in *)
void(* output_location )(struct output_block *, struct bitpack_d *, location_t)

Detailed Description

   Streamer hooks.  These functions do additional processing as
   needed by the module.  There are two types of callbacks, those that
   replace the default behavior and those that supplement it.

   Hooks marked [REQ] are required to be set.  Those marked [OPT] may
   be NULL, if the streamer does not need to implement them.  

Field Documentation

location_t(* streamer_hooks::input_location)(struct bitpack_d *, struct data_in *)
     [REQ] Called by every streaming routine that needs to read a location.  
void(* streamer_hooks::output_location)(struct output_block *, struct bitpack_d *, location_t)
     [REQ] Called by every streaming routine that needs to write a location.  
tree(* streamer_hooks::read_tree)(struct lto_input_block *, struct data_in *)
     [REQ] Called by every tree streaming routine that needs to read
     a tree node.  It takes two arguments: an lto_input_block pointing
     to the buffer where to read from and a data_in instance with tables
     and descriptors needed by the unpickling routines.  It returns the
     tree instantiated from the stream.  
void(* streamer_hooks::write_tree)(struct output_block *, tree, bool, bool)
     [REQ] Called by every tree streaming routine that needs to write
     a tree node.  The arguments are: output_block where to write the
     node, the tree node to write and a boolean flag that should be true
     if the caller wants to write a reference to the tree, instead of the
     tree itself.  The second boolean parameter specifies this for
     the tree itself, the first for all siblings that are streamed.
     The referencing mechanism is up to each streamer to implement.  

The documentation for this struct was generated from the following file: