Make the objfile constructor private
[deliverable/binutils-gdb.git] / gdb / objfiles.h
index 1601cfe591f0b4d7031555e9d67f0b2faac0dd7b..b5c04eb7cb95247b9aeda332dc6a0e7f12d36754 100644 (file)
@@ -394,7 +394,19 @@ private:
 
 struct objfile
 {
+private:
+
+  /* The only way to create an objfile is to call objfile::make.  */
   objfile (bfd *, const char *, objfile_flags);
+
+public:
+
+  /* Create an objfile.  */
+  static objfile *make (bfd *bfd_, const char *name_, objfile_flags flags_)
+  {
+    return new objfile (bfd_, name_, flags_);
+  }
+
   ~objfile ();
 
   DISABLE_COPY_AND_ASSIGN (objfile);
This page took 0.027355 seconds and 4 git commands to generate.