- mc_type_t type = MC_dwarf_die_to_type(info, die, unit, frame, ns);
-
- char *key = bprintf("%" PRIx64, (uint64_t) type->id);
- xbt_dict_set(info->types, key, type, NULL);
- xbt_free(key);
-
- if (!type->name.empty() && type->byte_size != 0) {
- xbt_dict_set(info->full_types_by_name, type->name.c_str(), type, NULL);
- }
+ simgrid::mc::Type type = MC_dwarf_die_to_type(info, die, unit, frame, ns);
+ auto& t = (info->types[type.id] = std::move(type));
+ if (!t.name.empty() && type.byte_size != 0)
+ info->full_types_by_name[t.name] = &t;