diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-08-25 11:23:24 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-08-26 10:03:55 +0200 |
commit | 7421802276e737c2da297599121480833db92de9 (patch) | |
tree | cd6cbc5a311c559679c6d3743940a6fb4a6ffc9e /gcc/d/dmd | |
parent | 1db88844a22f75b13ced224415f645680784d354 (diff) | |
download | gcc-7421802276e737c2da297599121480833db92de9.zip gcc-7421802276e737c2da297599121480833db92de9.tar.gz gcc-7421802276e737c2da297599121480833db92de9.tar.bz2 |
d: Use read() to load contents of stdin into memory.
This would be an improvement over reading one character at a time.
An ICE was discovered when mixing reading from stdin with `-v', this has been
fixed in upstream DMD and backported as well.
Reviewed-on: https://github.com/dlang/dmd/pull/11620
gcc/d/ChangeLog:
* d-lang.cc (d_parse_file): Use read() to load contents from stdin,
allow the front-end to free the memory after parsing.
* dmd/MERGE: Merge upstream dmd 2cc25c219.
Diffstat (limited to 'gcc/d/dmd')
-rw-r--r-- | gcc/d/dmd/MERGE | 2 | ||||
-rw-r--r-- | gcc/d/dmd/func.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index d0e5f44..8445bfaf 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -1b5a53d01c465109ce47edf49ace6143b69b118b +2cc25c2191928f865e1b711f30b6a4268d6a0d9a 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/func.c b/gcc/d/dmd/func.c index b684955..30ba8dd 100644 --- a/gcc/d/dmd/func.c +++ b/gcc/d/dmd/func.c @@ -1212,8 +1212,9 @@ Ldone: if (type && mod) { printedMain = true; - const char *name = FileName::searchPath(global.path, mod->srcfile->toChars(), true); - message("entry %-10s\t%s", type, name); + const char *name = mod->srcfile->toChars(); + const char *path = FileName::searchPath(global.path, name, true); + message("entry %-10s\t%s", type, path ? path : name); } } |