summaryrefslogtreecommitdiffstats
path: root/libcpp/files.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-16 17:07:01 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-16 17:07:01 +0000
commit821fa04597c85a989208417116a579a8333810cc (patch)
tree731f455afa7023a8116cc6a957e079da9a2f3e35 /libcpp/files.c
parent63db09c1cad487ddffdc5caaa6ecac9b87637e50 (diff)
downloadppe42-gcc-821fa04597c85a989208417116a579a8333810cc.tar.gz
ppe42-gcc-821fa04597c85a989208417116a579a8333810cc.zip
2004-07-16 Andris Pavenis <pavenis@latnet.lv>
PR preprocessor/16366 * internal.h (struct cpp_reader): New field dir_hash. * files.c (make_cpp_dir): Use dir_hash, not file_hash. (_cpp_init_files, _cpp_cleanup_files): Update for new field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84821 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/files.c')
-rw-r--r--libcpp/files.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libcpp/files.c b/libcpp/files.c
index cd8d077ef71..fc1fa2c7f0e 100644
--- a/libcpp/files.c
+++ b/libcpp/files.c
@@ -884,7 +884,7 @@ make_cpp_dir (cpp_reader *pfile, const char *dir_name, int sysp)
cpp_dir *dir;
hash_slot = (struct file_hash_entry **)
- htab_find_slot_with_hash (pfile->file_hash, dir_name,
+ htab_find_slot_with_hash (pfile->dir_hash, dir_name,
htab_hash_string (dir_name),
INSERT);
@@ -984,6 +984,8 @@ _cpp_init_files (cpp_reader *pfile)
{
pfile->file_hash = htab_create_alloc (127, file_hash_hash, file_hash_eq,
NULL, xcalloc, free);
+ pfile->dir_hash = htab_create_alloc (127, file_hash_hash, file_hash_eq,
+ NULL, xcalloc, free);
allocate_file_hash_entries (pfile);
}
@@ -992,6 +994,7 @@ void
_cpp_cleanup_files (cpp_reader *pfile)
{
htab_delete (pfile->file_hash);
+ htab_delete (pfile->dir_hash);
}
/* Enter a file name in the hash for the sake of cpp_included. */
OpenPOWER on IntegriCloud