> On Thu, 23 Aug 2018, Jan Hubicka wrote: > > > Hi > > this patch takes care of gcov. There are two oddities. First that gcov uses > > langhook to produce new records while asan gets around with make_node. > > I think both are middle-end types and in the direction of separating > > front-ends > > and middle-ends better the langhooks are not desirable. > > > > The TYPE_STUB_DECL is produced by finish_builtin_struct. This is function > > used > > just few times but I am not sure if we don't want debug info on some of the > > builtins, so I have added extra parameter. > > > > config/darwin.c: finish_builtin_struct (cfstring_type_node, > > "__builtin_CFString", > > config/i386/i386.c: finish_builtin_struct (type, "__processor_model", > > field_chain, NULL_TREE); > > coverage.c: finish_builtin_struct (ctr_info, "__gcov_ctr_info", fields, > > NULL_TREE, true); > > coverage.c: finish_builtin_struct (type, "__gcov_fn_info", fields, > > NULL_TREE, true); > > coverage.c: finish_builtin_struct (type, "__gcov_info", fields, NULL_TREE, > > true); > > cp/decl.c: finish_builtin_struct (t, "__ptrmemfunc_type", fields, > > ptr_type_node); > > cp/rtti.c: finish_builtin_struct (pseudo_type, pseudo_name, fields, > > NULL_TREE); > > hsa-brig.c: finish_builtin_struct (variable_info_type, > > "__hsa_variable_info", id_f2, > > hsa-brig.c: finish_builtin_struct (kernel_info_type, "__hsa_kernel_info", > > id_f5, > > hsa-brig.c: finish_builtin_struct (hsa_image_desc_type, > > "__hsa_image_desc", id_f5, > > hsa-gen.c: finish_builtin_struct (*hsa_kernel_dispatch_type, > > "__hsa_kernel_dispatch", > > objc/objc-act.c: /* NB: The finish_builtin_struct() routine expects > > FIELD_DECLs in > > objc/objc-act.c: finish_builtin_struct (type, "__builtin_ObjCString", > > omp-expand.c: finish_builtin_struct > > (grid_attr_trees->kernel_launch_attributes_type, > > stor-layout.c:finish_builtin_struct (tree type, const char *name, tree > > fields, > > stor-layout.h:extern void finish_builtin_struct (tree, const char *, tree, > > tree, > > > > Perhaps we could make them all to just use identifier_node > > but I am honestly not sure :) > > Given finish_builtin_struct uses BUILTINS_LOCATION for the TYPE_DECL > and dwarf2out.c does > > case TYPE_DECL: > /* Don't emit stubs for types unless they are needed by other DIEs. > */ > if (TYPE_DECL_SUPPRESS_DEBUG (decl)) > return; > > /* Don't bother trying to generate any DIEs to represent any of the > normal built-in types for the language we are compiling. */ > if (DECL_IS_BUILTIN (decl)) > return; > > making them just all IDENTIFIER_NODE is fine I think. At least for > the debuginfo part it shouldn't make any difference ...
OK, that is a good observation :) I will re-test variant of patch doing identifier pointers. I am bit concerned about the C++/objc use that may later use the type produced with the assumtion that it looks like C++/objc type :) Honza