Remove dwarf2_per_cu_data::dwarf2_per_objfile reference in cutu_reader::keep
[deliverable/binutils-gdb.git] / gdb / dwarf2 / read.c
index 64cf5f47f7b1530934fb35dc5208c6158fb82802..d58303098c1f18467177a2ab32149ddbf2479380 100644 (file)
@@ -7162,8 +7162,11 @@ cutu_reader::keep ()
   gdb_assert (!dummy_p);
   if (m_new_cu != NULL)
     {
-      struct dwarf2_per_objfile *dwarf2_per_objfile
-       = m_this_cu->dwarf2_per_objfile;
+      /* We know that m_this_cu->cu is set, since we are in the process of
+         parsing the CU.  */
+      gdb_assert (m_this_cu->cu != nullptr);
+      dwarf2_per_objfile *dwarf2_per_objfile = m_this_cu->cu->per_objfile;
+
       /* Link this CU into read_in_chain.  */
       m_this_cu->cu->read_in_chain = dwarf2_per_objfile->per_bfd->read_in_chain;
       dwarf2_per_objfile->per_bfd->read_in_chain = m_this_cu;
This page took 0.027435 seconds and 4 git commands to generate.