aboutsummaryrefslogtreecommitdiff
path: root/libcpp/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/files.c')
-rw-r--r--libcpp/files.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libcpp/files.c b/libcpp/files.c
index 1952774..22b1d05 100644
--- a/libcpp/files.c
+++ b/libcpp/files.c
@@ -1224,10 +1224,12 @@ bool
cpp_included_before (cpp_reader *pfile, const char *fname,
source_location location)
{
- struct cpp_file_hash_entry *entry;
+ struct cpp_file_hash_entry *entry
+ = (struct cpp_file_hash_entry *)
+ htab_find_with_hash (pfile->file_hash, fname, htab_hash_string (fname));
- entry = (struct cpp_file_hash_entry *)
- htab_find_with_hash (pfile->file_hash, fname, htab_hash_string (fname));
+ if (IS_ADHOC_LOC (location))
+ location = get_location_from_adhoc_loc (pfile->line_table, location);
while (entry && (entry->start_dir == NULL || entry->u.file->err_no
|| entry->location > location))