From 7cf3f604fb102ba67ce3abe7e97440b4ed0da92e Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 19 May 2020 13:20:32 -0700 Subject: preprocessor: Random cleanups This fixes a bunch of poorly formatted decls, marks some getters as PURE, deletes some C-relevant bool hackery, and finally uses a passed-in location rather than deducing a closely-related but not necessarily the same location. * include/cpplib.h (cpp_get_otions, cpp_get_callbacks) (cpp_get_deps): Mark as PURE. * include/line-map.h (get_combined_adhoc_loc) (get_location_from_adhoc_loc, get_pure_location): Reformat decls. * internal.h (struct lexer_state): Clarify comment. * system.h: Remove now-unneeded bool hackery. * files.c (_cpp_find_file): Store LOC not highest_location. --- libcpp/include/line-map.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'libcpp/include/line-map.h') diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index dbbc137..217f916 100644 --- a/libcpp/include/line-map.h +++ b/libcpp/include/line-map.h @@ -1024,13 +1024,11 @@ LINEMAPS_LAST_ALLOCATED_MACRO_MAP (const line_maps *set) return (line_map_macro *)LINEMAPS_LAST_ALLOCATED_MAP (set, true); } -extern location_t get_combined_adhoc_loc (class line_maps *, - location_t, - source_range, - void *); +extern location_t get_combined_adhoc_loc (line_maps *, location_t, + source_range, void *); extern void *get_data_from_adhoc_loc (const line_maps *, location_t); extern location_t get_location_from_adhoc_loc (const line_maps *, - location_t); + location_t); extern source_range get_range_from_loc (line_maps *set, location_t loc); @@ -1043,8 +1041,7 @@ pure_location_p (line_maps *set, location_t loc); /* Given location LOC within SET, strip away any packed range information or ad-hoc information. */ -extern location_t get_pure_location (line_maps *set, - location_t loc); +extern location_t get_pure_location (line_maps *set, location_t loc); /* Combine LOC and BLOCK, giving a combined adhoc location. */ -- cgit v1.1