aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-05-13 01:04:46 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-05-13 01:04:46 -0400
commit5116acc6fefb0a16d644defe9322a7fcee768c8c (patch)
tree572a495193f31f2ec341afb86e711e1dd2c80197 /gcc/dwarf2out.c
parentfbfc8363a378a676d5ab71fc44edf0b8f681ffa0 (diff)
downloadgcc-5116acc6fefb0a16d644defe9322a7fcee768c8c.zip
gcc-5116acc6fefb0a16d644defe9322a7fcee768c8c.tar.gz
gcc-5116acc6fefb0a16d644defe9322a7fcee768c8c.tar.bz2
re PR bootstrap/44048 (building without C++ enabled fails)
PR bootstrap/44048 PR target/44099 gcc/cp: * cp-tree.def (NULLPTR_TYPE): Remove. * cp-tree.h (NULLPTR_TYPE_P): New. (SCALAR_TYPE_P): Use it. (nullptr_type_node): New. (cp_tree_index): Add CPTI_NULLPTR_TYPE. * decl.c (cxx_init_decl_processing): Call record_builtin_type on nullptr_type_node. * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE. * cxx-pretty-print.c (pp_cxx_constant): Likewise. * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise. * mangle.c (write_type): Likewise. * name-lookup.c (arg_assoc_type): Likewise. * typeck.c (build_reinterpret_cast_1): Likewise. * rtti.c (typeinfo_in_lib_p): Likewise. (emit_support_tinfos): Remove local nullptr_type_node. gcc: * dbxout.c (dbxout_type): Remove NULLPTR_TYPE handling. * sdbout.c (plain_type_1): Likewise. * dwarf2out.c (is_base_type): Likewise. (gen_type_die_with_usage): Likewise. Generate DW_TAG_unspecified_type for any LANG_TYPE. From-SVN: r159350
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 467bb26..2e8ed39 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -12104,7 +12104,6 @@ is_base_type (tree type)
case ENUMERAL_TYPE:
case FUNCTION_TYPE:
case METHOD_TYPE:
- case NULLPTR_TYPE:
case POINTER_TYPE:
case REFERENCE_TYPE:
case OFFSET_TYPE:
@@ -19186,18 +19185,6 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die,
when appropriate. */
return;
- case NULLPTR_TYPE:
- {
- dw_die_ref type_die = lookup_type_die (type);
- if (type_die == NULL)
- {
- type_die = new_die (DW_TAG_unspecified_type, comp_unit_die, type);
- add_name_attribute (type_die, "decltype(nullptr)");
- equate_type_number_to_die (type, type_die);
- }
- }
- return;
-
case VOID_TYPE:
case INTEGER_TYPE:
case REAL_TYPE:
@@ -19208,7 +19195,19 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die,
break;
case LANG_TYPE:
- /* No Dwarf representation currently defined. */
+ /* Just use DW_TAG_unspecified_type. */
+ {
+ dw_die_ref type_die = lookup_type_die (type);
+ if (type_die == NULL)
+ {
+ tree name = TYPE_NAME (type);
+ if (TREE_CODE (name) == TYPE_DECL)
+ name = DECL_NAME (name);
+ type_die = new_die (DW_TAG_unspecified_type, comp_unit_die, type);
+ add_name_attribute (type_die, IDENTIFIER_POINTER (name));
+ equate_type_number_to_die (type, type_die);
+ }
+ }
break;
default: