From bda13cdcf0db4d9cee648bfa0bfc7f1a4415d2a7 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 1 Nov 2019 16:06:37 -0600 Subject: Make the objfile constructor private This changes the objfile constructor to be private, changing the callers to use a factory method. This isn't perhaps strictly needed for the goal of this series -- changing the container model of objfiles -- but is a nice symmetry. gdb/ChangeLog 2019-12-12 Tom Tromey * symfile.c (symbol_file_add_with_addrs): Use objfile::make. * objfiles.h (struct objfile): Make constructor private. : New static method. * jit.c (jit_object_close_impl): Update. Change-Id: I42e07bc80a88cf3322ace94ffe869ae5788bcb29 --- gdb/jit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/jit.c') diff --git a/gdb/jit.c b/gdb/jit.c index b6e51e4f8b4..2018e2c6f0d 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -786,8 +786,8 @@ jit_object_close_impl (struct gdb_symbol_callbacks *cb, priv_data = (jit_dbg_reader_data *) cb->priv_data; - objfile = new struct objfile (NULL, "<< JIT compiled code >>", - OBJF_NOT_FILENAME); + objfile = objfile::make (nullptr, "<< JIT compiled code >>", + OBJF_NOT_FILENAME); objfile->per_bfd->gdbarch = target_gdbarch (); j = NULL; -- cgit v1.2.1