diff options
| author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-06 16:18:40 +0000 |
|---|---|---|
| committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-06 16:18:40 +0000 |
| commit | 914db4b784e45909e13d0c229baf49234e4310bb (patch) | |
| tree | 81d6fae2161fe976ca587b7a58d10fda41f7e93b /libcpp/internal.h | |
| parent | 3687a208b7bfca87fc95ab9e26fa63d0edf474b5 (diff) | |
| download | gcc-914db4b784e45909e13d0c229baf49234e4310bb.tar.gz | |
PR middle-end/56461
* internal.h (struct cpp_buffer): Add to_free field.
(_cpp_pop_file_buffer): Add third argument.
* files.c (_cpp_stack_file): Set buffer->to_free.
(_cpp_pop_file_buffer): Add to_free argument. Free to_free
if non-NULL, and if equal to file->buffer_start, also clear
file->buffer{,_start,_valid}.
* directives.c (_cpp_pop_buffer): Pass buffer->to_free
to _cpp_pop_file_buffer.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196497 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/internal.h')
| -rw-r--r-- | libcpp/internal.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcpp/internal.h b/libcpp/internal.h index 7731666aba9..1226dbd982b 100644 --- a/libcpp/internal.h +++ b/libcpp/internal.h @@ -301,6 +301,8 @@ struct cpp_buffer const unsigned char *buf; /* Entire character buffer. */ const unsigned char *rlimit; /* Writable byte at end of file. */ + const unsigned char *to_free; /* Pointer that should be freed when + popping the buffer. */ _cpp_line_note *notes; /* Array of notes. */ unsigned int cur_note; /* Next note to process. */ @@ -635,7 +637,8 @@ extern int _cpp_compare_file_date (cpp_reader *, const char *, int); extern void _cpp_report_missing_guards (cpp_reader *); extern void _cpp_init_files (cpp_reader *); extern void _cpp_cleanup_files (cpp_reader *); -extern void _cpp_pop_file_buffer (cpp_reader *, struct _cpp_file *); +extern void _cpp_pop_file_buffer (cpp_reader *, struct _cpp_file *, + const unsigned char *); extern bool _cpp_save_file_entries (cpp_reader *pfile, FILE *f); extern bool _cpp_read_file_entries (cpp_reader *, FILE *); extern const char *_cpp_get_file_name (_cpp_file *); |
