Hi GCC developers,
As ChangeLog-2014 mentioned: Remove support for if_marked and param_is
about ggc, so I migrate to GCC v6.x, for example:
#if (GCC_MAJOR < 6)
// FIXME: gengtype not support macro?
//static GTY((if_marked("tree2int_marked_p"), param_is(struct tree2int)))
// htab_t intCache;
#else
struct intCacheHasher : ggc_cache_ptr_hash<tree2int> {
static inline hashval_t hash(tree2int *t2i) {
return tree_map_base_hash(t2i->base);
}
static inline bool equal(tree2int *a, tree2int *b) {
return a->base.from == b->base.from;
}
static int keep_cache_entry(tree2int *&t2i) {
return ggc_marked_p(t2i->base.from);
}
};
static GTY((cache))
hash_table<intCacheHasher> *intCache;
#endif
$ gcc-6.3.0/build/gcc/build/gengtype -r gcc-6.3.0/build/gcc/gtype.state
-P /tmp/gt-cache-6.3.inc Input.cpp
but it still parse the deprecated if_marked and param_is for GCC v4.x,
please give me some hint, thanks a lot!
--
Regards,
Leslie Zhai - a LLVM developer https://reviews.llvm.org/p/xiangzhai/