aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppfiles.c
diff options
context:
space:
mode:
authorNeil Booth <neil@gcc.gnu.org>2000-12-07 07:14:42 +0000
committerNeil Booth <neil@gcc.gnu.org>2000-12-07 07:14:42 +0000
commit9ba2e1ef8028112b47eb48041ae387c60acea6b1 (patch)
tree183c8a37ae0d1cb8f8f4a7c5d3cc009146d70982 /gcc/cppfiles.c
parent167ed88f7ab3220aab5b66fef1ac3c12a8d326b9 (diff)
downloadgcc-9ba2e1ef8028112b47eb48041ae387c60acea6b1.zip
gcc-9ba2e1ef8028112b47eb48041ae387c60acea6b1.tar.gz
gcc-9ba2e1ef8028112b47eb48041ae387c60acea6b1.tar.bz2
c-common.c (parse_in): Make a cpp_reader *.
* c-common.c (parse_in): Make a cpp_reader *. * cppfiles.c (_cpp_fake_include): Remove. * cpphash.h: Similarly. * cpplib.c (do_line): Don't call _cpp_fake_include. A valid #line always creates a callback; FC_RENAME if there are no #line flags. * fix-header.c (read_scan_file): cpp_push_buffer cannot fail. The first EOF must be our get_char buffer. From-SVN: r38101
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r--gcc/cppfiles.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c
index 0e924b3..8a943a1 100644
--- a/gcc/cppfiles.c
+++ b/gcc/cppfiles.c
@@ -474,50 +474,6 @@ find_include_file (pfile, fname, search_start)
return 0;
}
-/* #line uses this to save artificial file names. We have to stat the
- file because an all_include_files entry is always either + or -,
- there's no 'I don't know' value. */
-const char *
-_cpp_fake_include (pfile, fname)
- cpp_reader *pfile;
- const char *fname;
-{
- splay_tree_node nd;
- struct include_file *file;
- char *name;
-
- file = find_include_file (pfile, fname, CPP_OPTION (pfile, quote_include));
- if (file)
- {
- if (file->fd > 0)
- {
- close (file->fd);
- file->fd = -1;
- }
- return file->name;
- }
-
- name = xstrdup (fname);
- _cpp_simplify_pathname (name);
-
- /* We cannot just blindly insert a node, because there's still the
- chance that the node already exists but isn't on the search path. */
- nd = splay_tree_lookup (pfile->all_include_files, (splay_tree_key) name);
- if (nd)
- {
- free (name);
- return (const char *) nd->key;
- }
-
- file = xcnew (struct include_file);
- file->name = name;
- file->fd = -2;
- splay_tree_insert (pfile->all_include_files, (splay_tree_key) name,
- (splay_tree_value) file);
-
- return file->name;
-}
-
/* Not everyone who wants to set system-header-ness on a buffer can
see the details of struct include_file. This is an exported interface
because fix-header needs it. */