diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2003-08-02 16:29:46 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2003-08-02 16:29:46 +0000 |
commit | 49634b3a45f7d9e65a521ac665014d6a81194dc4 (patch) | |
tree | 2f3f5d24ede7076f17367de0a1945c6a8e563d8f /gcc/cpphash.h | |
parent | cf1ee30c6769682cfba0b8518349a451e04d5dcc (diff) | |
download | gcc-49634b3a45f7d9e65a521ac665014d6a81194dc4.tar.gz |
cppfiles.c (struct _cpp_file): Rename once_only_next to next_file.
* cppfiles.c (struct _cpp_file): Rename once_only_next to
next_file. Remove import and pragma_once, add once_only.
(find_file): Add new file structures to the all_files list.
(should_stack_file): Mark #import-ed files once-only, and
don't stack them if the file has already been stacked.
(_cp_mark_file_once_only): Simplify.
* cpphash.h (struct cpp_reader): Rename once_only_files
to all_files. Rename saw_pragma_once to seen_once_only.
(_cpp_mark_file_once_only): Update prototype.
* cpplib.c (do_pragma_once): Update.
testsuite:
* import1.c, import2.c: New tests.
From-SVN: r70106
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 951dd2f4101..8b8f3d896ed 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -359,8 +359,8 @@ struct cpp_reader struct cpp_dir *bracket_include; /* <> */ struct cpp_dir no_search_path; /* No path. */ - /* Chain of files that were #import-ed or contain #pragma once. */ - struct _cpp_file *once_only_files; + /* Chain of all hashed _cpp_file instances. */ + struct _cpp_file *all_files; /* File and directory hash table. */ struct htab *file_hash; @@ -371,8 +371,9 @@ struct cpp_reader directory. */ bool quote_ignores_source_dir; - /* Non-zero if any file has contained #pragma once. */ - bool saw_pragma_once; + /* Non-zero if any file has contained #pragma once or #import has + been used. */ + bool seen_once_only; /* Multiple include optimization. */ const cpp_hashnode *mi_cmacro; @@ -514,7 +515,7 @@ extern void _cpp_init_hashtable (cpp_reader *, hash_table *); extern void _cpp_destroy_hashtable (cpp_reader *); /* In cppfiles.c */ -extern void _cpp_mark_file_once_only (cpp_reader *, struct _cpp_file *, bool); +extern void _cpp_mark_file_once_only (cpp_reader *, struct _cpp_file *); extern void _cpp_fake_include (cpp_reader *, const char *); extern bool _cpp_stack_file (cpp_reader *, const char *); extern bool _cpp_stack_include (cpp_reader *, const char *, int, |