summaryrefslogtreecommitdiff
path: root/libcpp/mkdeps.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2019-05-07 18:13:57 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2019-05-07 18:13:57 +0000
commit61145d937ba07e368d8251fd0ffe0b987b50a7b5 (patch)
tree7b1638fe2e3117ac734d21c0889d8c341f89c539 /libcpp/mkdeps.c
parent2ed6d245f7b79de73125edec51b2aa6db9ce3e6d (diff)
downloadgcc-61145d937ba07e368d8251fd0ffe0b987b50a7b5.tar.gz
[libcpp] Reimplement mkdeps data structures
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00323.html * files.c (_cpp_stack_file): Empty filenames aren't dependencies. * mkdeps.c (deps_add_dep): Assert not empty. From-SVN: r270978
Diffstat (limited to 'libcpp/mkdeps.c')
-rw-r--r--libcpp/mkdeps.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcpp/mkdeps.c b/libcpp/mkdeps.c
index a9a050cf110..96cc49b9cc1 100644
--- a/libcpp/mkdeps.c
+++ b/libcpp/mkdeps.c
@@ -281,6 +281,8 @@ deps_add_default_target (struct mkdeps *d, const char *tgt)
void
deps_add_dep (struct mkdeps *d, const char *t)
{
+ gcc_assert (*t);
+
t = apply_vpath (d, t);
d->deps.push (xstrdup (t));