d: Use read() to load contents of stdin into memory.
authorIain Buclaw <ibuclaw@gdcproject.org>
Tue, 25 Aug 2020 09:23:24 +0000 (11:23 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Wed, 26 Aug 2020 08:03:55 +0000 (10:03 +0200)
commit7421802276e737c2da297599121480833db92de9
treecd6cbc5a311c559679c6d3743940a6fb4a6ffc9e
parent1db88844a22f75b13ced224415f645680784d354
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.
gcc/d/d-lang.cc
gcc/d/dmd/MERGE
gcc/d/dmd/func.c