Make add_separate_debug_objfile static
[deliverable/binutils-gdb.git] / gdb / objfiles.c
index b5bc09f41eafc7f335567d6d8cfc4348dc0af82e..0ee5720cf67bc671359db45e42a020728b7be359 100644 (file)
@@ -520,7 +520,7 @@ put_objfile_before (struct objfile *objfile, struct objfile *before_this)
 
 /* Add OBJFILE as a separate debug objfile of PARENT.  */
 
-void
+static void
 add_separate_debug_objfile (struct objfile *objfile, struct objfile *parent)
 {
   gdb_assert (objfile && parent);
@@ -541,6 +541,18 @@ add_separate_debug_objfile (struct objfile *objfile, struct objfile *parent)
   put_objfile_before (objfile, parent);
 }
 
+/* See objfiles.h.  */
+
+objfile *
+objfile::make (bfd *bfd_, const char *name_, objfile_flags flags_,
+              objfile *parent)
+{
+  objfile *result = new objfile (bfd_, name_, flags_);
+  if (parent != nullptr)
+    add_separate_debug_objfile (result, parent);
+  return result;
+}
+
 /* Free all separate debug objfile of OBJFILE, but don't free OBJFILE
    itself.  */
 
This page took 0.023432 seconds and 4 git commands to generate.