comparison gcc/streamer-hooks.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* Streamer hooks. Support for adding streamer-specific callbacks to 1 /* Streamer hooks. Support for adding streamer-specific callbacks to
2 generic streaming routines. 2 generic streaming routines.
3 3
4 Copyright (C) 2011-2018 Free Software Foundation, Inc. 4 Copyright (C) 2011-2020 Free Software Foundation, Inc.
5 Contributed by Diego Novillo <dnovillo@google.com> 5 Contributed by Diego Novillo <dnovillo@google.com>
6 6
7 This file is part of GCC. 7 This file is part of GCC.
8 8
9 GCC is free software; you can redistribute it and/or modify it under 9 GCC is free software; you can redistribute it and/or modify it under
23 #ifndef GCC_STREAMER_HOOKS_H 23 #ifndef GCC_STREAMER_HOOKS_H
24 #define GCC_STREAMER_HOOKS_H 24 #define GCC_STREAMER_HOOKS_H
25 25
26 /* Forward declarations to avoid including unnecessary headers. */ 26 /* Forward declarations to avoid including unnecessary headers. */
27 struct output_block; 27 struct output_block;
28 struct lto_input_block; 28 class lto_input_block;
29 struct data_in; 29 class data_in;
30 30
31 /* Streamer hooks. These functions do additional processing as 31 /* Streamer hooks. These functions do additional processing as
32 needed by the module. There are two types of callbacks, those that 32 needed by the module. There are two types of callbacks, those that
33 replace the default behavior and those that supplement it. 33 replace the default behavior and those that supplement it.
34 34
47 /* [REQ] Called by every tree streaming routine that needs to read 47 /* [REQ] Called by every tree streaming routine that needs to read
48 a tree node. It takes two arguments: an lto_input_block pointing 48 a tree node. It takes two arguments: an lto_input_block pointing
49 to the buffer where to read from and a data_in instance with tables 49 to the buffer where to read from and a data_in instance with tables
50 and descriptors needed by the unpickling routines. It returns the 50 and descriptors needed by the unpickling routines. It returns the
51 tree instantiated from the stream. */ 51 tree instantiated from the stream. */
52 tree (*read_tree) (struct lto_input_block *, struct data_in *); 52 tree (*read_tree) (class lto_input_block *, class data_in *);
53 53
54 /* [REQ] Called by every streaming routine that needs to read a location. */ 54 /* [REQ] Called by every streaming routine that needs to read a location. */
55 void (*input_location) (location_t *, struct bitpack_d *, struct data_in *); 55 void (*input_location) (location_t *, struct bitpack_d *, class data_in *);
56 56
57 /* [REQ] Called by every streaming routine that needs to write a location. */ 57 /* [REQ] Called by every streaming routine that needs to write a location. */
58 void (*output_location) (struct output_block *, struct bitpack_d *, location_t); 58 void (*output_location) (struct output_block *, struct bitpack_d *, location_t);
59 }; 59 };
60 60