aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppfiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r--gcc/cppfiles.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c
index d31f61b7aee..ac30d095ebc 100644
--- a/gcc/cppfiles.c
+++ b/gcc/cppfiles.c
@@ -362,7 +362,7 @@ search_path_exhausted (cpp_reader *pfile, const char *header, _cpp_file *file)
if (func
&& file->dir == NULL)
{
- if ((file->path = func (pfile, header)) != NULL)
+ if ((file->path = func (pfile, header, &file->dir)) != NULL)
{
if (open_file (file))
return true;
@@ -1315,6 +1315,14 @@ cpp_get_path (struct _cpp_file *f)
return f->path;
}
+/* Get the directory associated with the _cpp_file F. */
+
+cpp_dir *
+cpp_get_dir (struct _cpp_file *f)
+{
+ return f->dir;
+}
+
/* Get the cpp_buffer currently associated with the cpp_reader
PFILE. */