public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/guojiufu/heads/guojiufu-branch)] d: Merge upstream dmd 1831b24ff.
@ 2020-06-10 3:42 Jiu Fu Guo
0 siblings, 0 replies; only message in thread
From: Jiu Fu Guo @ 2020-06-10 3:42 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:761306fc5e60b1af1f7d0cc076da772a6c821cac
commit 761306fc5e60b1af1f7d0cc076da772a6c821cac
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Sun Jun 7 16:37:25 2020 +0200
d: Merge upstream dmd 1831b24ff.
Converts some global and param fields from pointers to value types.
Reviewed-on: https://github.com/dlang/dmd/pull/11245
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 1831b24ff.
* d-lang.cc (d_init_options): Remove initialization of updated fields.
(d_handle_option): Adjust for new field types.
Diff:
---
gcc/d/d-lang.cc | 10 ++--------
gcc/d/dmd/MERGE | 2 +-
gcc/d/dmd/dmodule.c | 2 +-
gcc/d/dmd/doc.c | 6 +++---
gcc/d/dmd/globals.h | 12 ++++++------
5 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/gcc/d/d-lang.cc b/gcc/d/d-lang.cc
index c4477cd90cb..41921934fdd 100644
--- a/gcc/d/d-lang.cc
+++ b/gcc/d/d-lang.cc
@@ -297,18 +297,12 @@ d_init_options (unsigned int, cl_decoded_option *decoded_options)
/* Default extern(C++) mangling to C++14. */
global.params.cplusplus = CppStdRevisionCpp14;
- global.params.linkswitches = new Strings ();
- global.params.libfiles = new Strings ();
- global.params.objfiles = new Strings ();
- global.params.ddocfiles = new Strings ();
-
/* Warnings and deprecations are disabled by default. */
global.params.useDeprecated = DIAGNOSTICoff;
global.params.warnings = DIAGNOSTICoff;
global.params.imppath = new Strings ();
global.params.fileImppath = new Strings ();
- global.params.modFileAliasStrings = new Strings ();
/* Extra GDC-specific options. */
d_option.fonly = NULL;
@@ -474,7 +468,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
break;
case OPT_fdoc_inc_:
- global.params.ddocfiles->push (arg);
+ global.params.ddocfiles.push (arg);
break;
case OPT_fdruntime:
@@ -502,7 +496,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
break;
case OPT_fmodule_file_:
- global.params.modFileAliasStrings->push (arg);
+ global.params.modFileAliasStrings.push (arg);
if (!strchr (arg, '='))
error ("bad argument for %<-fmodule-file%>: %qs", arg);
break;
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE
index fa94d63e471..56a47bb61a3 100644
--- a/gcc/d/dmd/MERGE
+++ b/gcc/d/dmd/MERGE
@@ -1,4 +1,4 @@
-cef1e7991121a22f50e9966ea407805015922bc7
+1831b24fffe35fd0e332c194fdf8723ba3c930a5
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
diff --git a/gcc/d/dmd/dmodule.c b/gcc/d/dmd/dmodule.c
index 09e95472330..5bb544746ec 100644
--- a/gcc/d/dmd/dmodule.c
+++ b/gcc/d/dmd/dmodule.c
@@ -228,7 +228,7 @@ Module *Module::load(Loc loc, Identifiers *packages, Identifier *ident)
{
OutBuffer buf;
OutBuffer dotmods;
- Array<const char *> *ms = global.params.modFileAliasStrings;
+ Array<const char *> *ms = &global.params.modFileAliasStrings;
const size_t msdim = ms ? ms->length : 0;
for (size_t i = 0; i < packages->length; i++)
diff --git a/gcc/d/dmd/doc.c b/gcc/d/dmd/doc.c
index 7c21ab2efe7..e0bf94086d9 100644
--- a/gcc/d/dmd/doc.c
+++ b/gcc/d/dmd/doc.c
@@ -351,12 +351,12 @@ void gendocfile(Module *m)
// Override with DDOCFILE specified in the sc.ini file
char *p = getenv("DDOCFILE");
if (p)
- global.params.ddocfiles->shift(p);
+ global.params.ddocfiles.shift(p);
// Override with the ddoc macro files from the command line
- for (size_t i = 0; i < global.params.ddocfiles->length; i++)
+ for (size_t i = 0; i < global.params.ddocfiles.length; i++)
{
- FileName f((*global.params.ddocfiles)[i]);
+ FileName f(global.params.ddocfiles[i]);
File file(&f);
readFile(m->loc, &file);
// BUG: convert file contents to UTF-8 before use
diff --git a/gcc/d/dmd/globals.h b/gcc/d/dmd/globals.h
index 5b5aac3ab68..8a2ffdc2a56 100644
--- a/gcc/d/dmd/globals.h
+++ b/gcc/d/dmd/globals.h
@@ -145,7 +145,7 @@ struct Param
CHECKACTION checkAction; // action to take when bounds, asserts or switch defaults are violated
DString argv0; // program name
- Array<const char *> *modFileAliasStrings; // array of char*'s of -I module filename alias strings
+ Array<const char *> modFileAliasStrings; // array of char*'s of -I module filename alias strings
Array<const char *> *imppath; // array of char*'s of where to look for import modules
Array<const char *> *fileImppath; // array of char*'s of where to look for file import modules
DString objdir; // .obj/.lib file output directory
@@ -155,7 +155,7 @@ struct Param
bool doDocComments; // process embedded documentation comments
DString docdir; // write documentation file to docdir directory
DString docname; // write documentation file to docname
- Array<const char *> *ddocfiles; // macro include files for Ddoc
+ Array<const char *> ddocfiles; // macro include files for Ddoc
bool doHdrGeneration; // process embedded documentation comments
DString hdrdir; // write 'header' file to docdir directory
@@ -190,10 +190,10 @@ struct Param
Strings runargs; // arguments for executable
// Linker stuff
- Array<const char *> *objfiles;
- Array<const char *> *linkswitches;
- Array<const char *> *libfiles;
- Array<const char *> *dllfiles;
+ Array<const char *> objfiles;
+ Array<const char *> linkswitches;
+ Array<const char *> libfiles;
+ Array<const char *> dllfiles;
DString deffile;
DString resfile;
DString exefile;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-10 3:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 3:42 [gcc(refs/users/guojiufu/heads/guojiufu-branch)] d: Merge upstream dmd 1831b24ff Jiu Fu Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).