diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-07-28 05:49:35 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-07-28 05:52:44 -0700 |
commit | 134051f16bd490ada9febb7511a202b34b1821f3 (patch) | |
tree | 79937557fa5574cf4b70b576a5d4945e12d27d59 /libcpp | |
parent | 6dcf042368012e2d7ce1626ee5d378bf3ad0ccfc (diff) | |
download | gcc-134051f16bd490ada9febb7511a202b34b1821f3.zip gcc-134051f16bd490ada9febb7511a202b34b1821f3.tar.gz gcc-134051f16bd490ada9febb7511a202b34b1821f3.tar.bz2 |
preprocessor: Simplify read_main
We can always use the final map to get the return value, rather than
conditionally only when there was an immediate line directive.
libcpp/
* init.c (cpp_read_main_file): Always use the last map for
the return value.
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/init.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libcpp/init.c b/libcpp/init.c index 0aac5ac..f9f1fb2 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -683,12 +683,9 @@ cpp_read_main_file (cpp_reader *pfile, const char *fname, bool injecting) /* For foo.i, read the original filename foo.c now, for the benefit of the front ends. */ if (CPP_OPTION (pfile, preprocessed)) - { - read_original_filename (pfile); - fname = (ORDINARY_MAP_FILE_NAME - ((LINEMAPS_LAST_ORDINARY_MAP (pfile->line_table)))); - } - return fname; + read_original_filename (pfile); + + return ORDINARY_MAP_FILE_NAME (LINEMAPS_LAST_ORDINARY_MAP (pfile->line_table)); } /* For preprocessed files, if the first tokens are of the form # NUM. |