On 12/3/12, Diego Novillo <dnovi...@google.com> wrote: > On 2012-12-01 20:40 , Lawrence Crowl wrote: > > Change LTO-related hash tables from htab_t to hash_table: > > > > lto-streamer.h output_block::string_hash_table > > lto-streamer-in.c file_name_hash_table > > lto-streamer.c tree_htab > > > > The struct string_slot moves from data-streamer.h to > > lto-streamer.h to resolve compilation dependences. > > What compilation dependences? If it was fine before in > data-streamer.h why does it need to move to lto-streamer.h? > I'm missing that connection.
Before the change, lto-streamer.h output_block::string_hash_table was an htab_t. The element type was opaque, i.e. implicit in the void* casting in the hash functions provided at the htab_create call site. With the change to hash_table, the output_block::string_hash_table declaration needed string_slot_hasher which in turn needed string_slot. But string_slot was defined in data-streamer.h after output_block in lto-streamer.h. So, something had to move. -- Lawrence Crowl