diff options
author | Nathan Sidwell <nathan@acm.org> | 2019-05-07 12:39:59 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2019-05-07 12:39:59 +0000 |
commit | d7b6aee8cd346328b6f22fc415ffc28b9cf8a285 (patch) | |
tree | d5215a9bd23a4458a51a91a6c508044421f4bb88 /libcpp/init.c | |
parent | 7664eeb700d9e95339f04a1c308a095b53d7a5fb (diff) | |
download | gcc-d7b6aee8cd346328b6f22fc415ffc28b9cf8a285.zip gcc-d7b6aee8cd346328b6f22fc415ffc28b9cf8a285.tar.gz gcc-d7b6aee8cd346328b6f22fc415ffc28b9cf8a285.tar.bz2 |
[libcpp] Reimplement mkdeps data structures
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00293.html
* include/mkdeps.h (deps_write): Add PHONY arg.
(deps_phony_targets): Delete.
* init.c (cpp_finish): Just call deps_write.
* mkdeps.c (struct mkdeps): Add local vector class. Reimplement
vector handling.
(munge): Munge to static buffer.
(apply_vpath): Adjust vector handling.
(deps_init, deps_free): Use new, delete.
(deps_add_target): Do not munge here. Record quoting low water mark.
(deps_add_dep): Do not munge here.
(deps_add_vpath): Adjust vector handling.
(make_write_name): New. Munge on demand here.
(make_write_vec): New.
(deps_phony_targets): Delete.
(make_write): New.
(deps_write): Forward to deps_Write.
(deps_save, deps_restore): Adjust vector handling.
From-SVN: r270943
Diffstat (limited to 'libcpp/init.c')
-rw-r--r-- | libcpp/init.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libcpp/init.c b/libcpp/init.c index 60d2588..c0c9020 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -764,14 +764,9 @@ cpp_finish (cpp_reader *pfile, FILE *deps_stream) while (pfile->buffer) _cpp_pop_buffer (pfile); - if (CPP_OPTION (pfile, deps.style) != DEPS_NONE - && deps_stream) - { - deps_write (pfile->deps, deps_stream, 72); - - if (CPP_OPTION (pfile, deps.phony_targets)) - deps_phony_targets (pfile->deps, deps_stream); - } + if (CPP_OPTION (pfile, deps.style) != DEPS_NONE && deps_stream) + deps_write (pfile->deps, deps_stream, + CPP_OPTION (pfile, deps.phony_targets), 72); /* Report on headers that could use multiple include guards. */ if (CPP_OPTION (pfile, print_include_names)) |