Revert:
[deliverable/binutils-gdb.git] / gdb / dwarf2read.c
index ac954e66fcdb816e2ab3399f758cd5960921a0a2..372089116fecbeef20e0af0169d2e298dc50319e 100644 (file)
@@ -6271,9 +6271,9 @@ dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type,
        (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields));
       B_CLRALL (TYPE_FIELD_PROTECTED_BITS (type), nfields);
 
-      /* We don't set TYPE_FIELD_IGNORE_BITS here.  The DWARF reader
-        never sets any bits in that array, so leaving it NULL lets us
-        save a little memory.  */
+      TYPE_FIELD_IGNORE_BITS (type) =
+       (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields));
+      B_CLRALL (TYPE_FIELD_IGNORE_BITS (type), nfields);
     }
 
   /* If the type has baseclasses, allocate and clear a bit vector for
@@ -10729,20 +10729,21 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
                               && (cu->language == language_cplus
                                   || cu->language == language_java)
                               ? &global_symbols : cu->list_in_scope);
-             }
 
-           /* The semantics of C++ state that "struct foo { ... }" also
-              defines a typedef for "foo".  A Java class declaration also
-              defines a typedef for the class.  */
-           if (cu->language == language_cplus
-               || cu->language == language_java
-               || cu->language == language_ada)
-             {
-               /* The symbol's name is already allocated along with
-                  this objfile, so we don't need to duplicate it for
-                  the type.  */
-               if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
-                 TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_SEARCH_NAME (sym);
+               /* The semantics of C++ state that "struct foo {
+                  ... }" also defines a typedef for "foo".  A Java
+                  class declaration also defines a typedef for the
+                  class.  */
+               if (cu->language == language_cplus
+                   || cu->language == language_java
+                   || cu->language == language_ada)
+                 {
+                   /* The symbol's name is already allocated along
+                      with this objfile, so we don't need to
+                      duplicate it for the type.  */
+                   if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
+                     TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_SEARCH_NAME (sym);
+                 }
              }
          }
          break;
This page took 0.02735 seconds and 4 git commands to generate.