- if (subfile->line_vector)
- {
- linetablesize = sizeof (struct linetable) +
- subfile->line_vector->nitems * sizeof (struct linetable_entry);
-
- /* Like the pending blocks, the line table may be
- scrambled in reordered executables. Sort it if
- OBJF_REORDERED is true. */
- if (objfile->flags & OBJF_REORDERED)
- qsort (subfile->line_vector->item,
- subfile->line_vector->nitems,
- sizeof (struct linetable_entry), compare_line_numbers);
- }
-
- /* Now, allocate a symbol table. */
- if (subfile->symtab == NULL)
- symtab = allocate_symtab (subfile->name, objfile);
- else
- symtab = subfile->symtab;
-
- /* Fill in its components. */
- symtab->blockvector = blockvector;
- symtab->macro_table = pending_macros;
- if (subfile->line_vector)
- {
- /* Reallocate the line table on the symbol obstack. */
- symtab->linetable = (struct linetable *)
- obstack_alloc (&objfile->objfile_obstack, linetablesize);
- memcpy (symtab->linetable, subfile->line_vector, linetablesize);
- }
- else
- {
- symtab->linetable = NULL;
- }
- symtab->block_line_section = section;
- if (subfile->dirname)
- {
- /* Reallocate the dirname on the symbol obstack. */
- symtab->dirname = (char *)
- obstack_alloc (&objfile->objfile_obstack,
- strlen (subfile->dirname) + 1);
- strcpy (symtab->dirname, subfile->dirname);
- }
- else
- {
- symtab->dirname = NULL;
- }
-
- /* Use whatever language we have been using for this
- subfile, not the one that was deduced in allocate_symtab
- from the filename. We already did our own deducing when
- we created the subfile, and we may have altered our
- opinion of what language it is from things we found in
- the symbols. */
- symtab->language = subfile->language;
-
- /* Save the debug format string (if any) in the symtab. */
- symtab->debugformat = subfile->debugformat;
+ linetablesize = sizeof (struct linetable) +
+ subfile->line_vector->nitems * sizeof (struct linetable_entry);
+
+ /* Like the pending blocks, the line table may be
+ scrambled in reordered executables. Sort it if
+ OBJF_REORDERED is true. */
+ if (m_objfile->flags & OBJF_REORDERED)
+ std::sort (subfile->line_vector->item,
+ subfile->line_vector->item
+ + subfile->line_vector->nitems,
+ lte_is_less_than);
+ }