diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-05 05:33:57 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-05 05:33:57 +0000 |
commit | f51c214891c0d16cba6159712002fa8733653a65 (patch) | |
tree | 0faabdcd2aa742b82e58d484b96722dd2b861e6e /gcc/cpphash.h | |
parent | ffbff7a4f5806675b9373a398e619ff5e6173117 (diff) | |
download | gcc-f51c214891c0d16cba6159712002fa8733653a65.tar.gz |
toplevel:
* cpplex.c: Don't include sys/mman.h.
(cpp_push_buffer, cpp_pop_buffer): Moved to cpplib.c.
* cpplib.c: Include sys/mman.h and obstack.h.
(cpp_push_buffer): Moved from cpplex.c; allocate buffers on an
obstack.
(cpp_pop_buffer): Moved from cpplex.c; free buffers from an obstack.
(_cpp_unwind_if_stack): Now static, unwind_if_stack. Don't
bother freeing if stack entries (they will be freed with their buffer).
(do_endif): Free if stack entries from the buffer obstack.
(push_conditional): Allocate if stack entries from the buffer obstack.
(find_answer): Rename to _cpp_find_answer.
(do_assert, do_unassert): Update.
* cpphash.h: Update prototypes.
(xobnew): New convenience macro.
* cpplib.h (struct cpp_reader): Add hash_ob and buffer_ob fields.
Update comments.
(struct cpp_hashnode): Remove disabled field.
* cppinit.c: Don't include hashtab.h or splay-tree.h.
(report_missing_guard): Moved to cppfiles.c.
(cpp_reader_init): Call cpp_init_stacks, cpp_init_macros,
cpp_init_includes.
(cpp_cleanup): Call cpp_cleanup_stacks, cpp_cleanup_macros,
cpp_cleanup_includes. Don't destroy hashtab or
all_include_files here.
(cpp_finish): Use _cpp_report_missing_guards.
* cppfiles.c (report_missing_guard): Moved from cppinit.c.
(_cpp_init_include_table): Rename _cpp_init_includes.
(_cpp_cleanup_includes, _cpp_report_missing_guards): New.
* cppexp.c (parse_assertion): Update for new name of
find_answer.
* Makefile.in (cpplib.o, cpphash.o, cppinit.o): Update deps.
* cpplib.c (do_ident): s/VSPACE/EOF/
testsuite:
* gcc.dg/cpp/ident.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34870 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index f7c130b79d5..0fde6608d31 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -188,7 +188,8 @@ extern unsigned int _cpp_calc_hash PARAMS ((const U_CHAR *, size_t)); extern void _cpp_free_definition PARAMS ((cpp_hashnode *)); extern int _cpp_create_definition PARAMS ((cpp_reader *, cpp_hashnode *)); extern void _cpp_dump_definition PARAMS ((cpp_reader *, cpp_hashnode *)); -extern void _cpp_init_macro_hash PARAMS ((cpp_reader *)); +extern void _cpp_init_macros PARAMS ((cpp_reader *)); +extern void _cpp_cleanup_macros PARAMS ((cpp_reader *)); extern void _cpp_dump_macro_hash PARAMS ((cpp_reader *)); /* In cppfiles.c */ @@ -199,7 +200,9 @@ extern void _cpp_execute_include PARAMS ((cpp_reader *, const U_CHAR *, int)); extern int _cpp_compare_file_date PARAMS ((cpp_reader *, const U_CHAR *, unsigned int, int)); -extern void _cpp_init_include_table PARAMS ((cpp_reader *)); +extern void _cpp_report_missing_guards PARAMS ((cpp_reader *)); +extern void _cpp_init_includes PARAMS ((cpp_reader *)); +extern void _cpp_cleanup_includes PARAMS ((cpp_reader *)); extern const char *_cpp_fake_include PARAMS ((cpp_reader *, const char *)); /* In cppexp.c */ @@ -241,15 +244,17 @@ extern const struct directive *_cpp_check_directive PARAMS ((cpp_reader *, const cpp_token *, int)); extern const struct directive *_cpp_check_linemarker PARAMS ((cpp_reader *, const cpp_token *, int)); -extern void _cpp_unwind_if_stack PARAMS ((cpp_reader *, cpp_buffer *)); -extern cpp_hashnode * _cpp_parse_assertion PARAMS ((cpp_reader *, +extern cpp_hashnode *_cpp_parse_assertion PARAMS ((cpp_reader *, struct answer **)); -extern struct answer** find_answer PARAMS ((cpp_hashnode *, +extern struct answer **_cpp_find_answer PARAMS ((cpp_hashnode *, const cpp_toklist *)); +extern void _cpp_init_stacks PARAMS ((cpp_reader *)); +extern void _cpp_cleanup_stacks PARAMS ((cpp_reader *)); /* Utility routines and macros. */ #define xnew(T) (T *) xmalloc (sizeof(T)) #define xnewvec(T, N) (T *) xmalloc (sizeof(T) * (N)) +#define xobnew(O, T) (T *) obstack_alloc (O, sizeof(T)) /* These are inline functions instead of macros so we can get type checking. */ |