aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
authorPer Bothner <pbothner@apple.com>2003-10-02 07:23:27 +0000
committerPer Bothner <bothner@gcc.gnu.org>2003-10-02 00:23:27 -0700
commit4dc299fbbed1b96ca647123280ffd3874666460b (patch)
treed42ac396e3c05ffb67c9335d47f0193aefee767b /gcc/cpphash.h
parenta506c55cb1000de54bb5a2907e10f31113c46133 (diff)
downloadgcc-4dc299fbbed1b96ca647123280ffd3874666460b.zip
gcc-4dc299fbbed1b96ca647123280ffd3874666460b.tar.gz
gcc-4dc299fbbed1b96ca647123280ffd3874666460b.tar.bz2
cppinit.c (cpp_read_main_file): Split into two functions: Distribute _cpp_stack_file call over the two functions.
* cppinit.c (cpp_read_main_file): Split into two functions: Distribute _cpp_stack_file call over the two functions. (cpp_find_main_file): New function. Don't call _cpp_do_file_change even if working_directory flag set. (cpp_push_main_file): New function. * cppfiles.c (_cpp_find_failed): New helper function. (find_file): Made non-static and renamed to _cpp_find_file. (_cpp_stack_file): No longer needed. But note the following. (stack_file): Made non-static and renamed to _cpp_stack_file. * fix-header.c (cpp_read_main_file): Replace cpp_read_main_file call with calls to cpp_find_main_file and cpp_push_main_file. (search_path_head): If there is no current buffer, use main_file. * cpphash.h: Update function declarations. * cpplib.h: Update function declarations. From-SVN: r72014
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index 89124b5..734d3bb 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -307,11 +307,6 @@ struct cpp_buffer
include files has been calculated and stored in "dir" below. */
unsigned char search_cached;
- /* At EOF, a buffer is automatically popped. If RETURN_AT_EOF is
- true, a CPP_EOF token is then returned. Otherwise, the next
- token from the enclosing buffer is returned. */
- bool return_at_eof;
-
/* The directory of the this buffer's file. Its NAME member is not
allocated, so we don't need to worry about freeing it. */
struct cpp_dir dir;
@@ -362,6 +357,8 @@ struct cpp_reader
/* Chain of all hashed _cpp_file instances. */
struct _cpp_file *all_files;
+ struct _cpp_file *main_file;
+
/* File and directory hash table. */
struct htab *file_hash;
struct file_hash_entry *file_hash_entries;
@@ -515,9 +512,13 @@ extern void _cpp_init_hashtable (cpp_reader *, hash_table *);
extern void _cpp_destroy_hashtable (cpp_reader *);
/* In cppfiles.c */
+typedef struct _cpp_file _cpp_file;
+extern _cpp_file *_cpp_find_file (cpp_reader *, const char *fname,
+ cpp_dir *start_dir, bool fake);
+extern bool _cpp_find_failed (_cpp_file *);
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_file (cpp_reader *, _cpp_file*, bool);
extern bool _cpp_stack_include (cpp_reader *, const char *, int,
enum include_type);
extern int _cpp_compare_file_date (cpp_reader *, const char *, int);