mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-21 19:35:28 -05:00
libcpp: eliminate LINEMAPS_{,ORDINARY_,MACRO_}CACHE
It's simpler to use field access than to go through these inline functions that look as if they are macros. No functional change intended. libcpp/ChangeLog: * include/line-map.h (maps_info_ordinary::cache): Rename to... (maps_info_ordinary::m_cache): ...this. (maps_info_macro::cache): Rename to... (maps_info_macro::m_cache): ...this. (LINEMAPS_CACHE): Delete. (LINEMAPS_ORDINARY_CACHE): Delete. (LINEMAPS_MACRO_CACHE): Delete. * init.cc (read_original_filename): Update for adding "m_" prefix. * line-map.cc (linemap_add): Eliminate LINEMAPS_ORDINARY_CACHE in favor of a simple field access. (linemap_enter_macro): Likewise for LINEMAPS_MACRO_CACHE. (linemap_ordinary_map_lookup): Likewise for LINEMAPS_ORDINARY_CACHE, twice. (linemap_lookup_macro_index): Likewise for LINEMAPS_MACRO_CACHE. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
This commit is contained in:
@@ -788,7 +788,7 @@ read_original_filename (cpp_reader *pfile)
|
||||
penult[1].reason = penult[0].reason;
|
||||
penult[0] = penult[1];
|
||||
pfile->line_table->info_ordinary.used--;
|
||||
pfile->line_table->info_ordinary.cache = 0;
|
||||
pfile->line_table->info_ordinary.m_cache = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user