diff options
Diffstat (limited to 'libcpp/include')
-rw-r--r-- | libcpp/include/cpplib.h | 2 | ||||
-rw-r--r-- | libcpp/include/line-map.h | 19 |
2 files changed, 19 insertions, 2 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 3bf33ab..7c147ae 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -1169,6 +1169,8 @@ extern const char *cpp_probe_header_unit (cpp_reader *, const char *file, extern const char *cpp_get_narrow_charset_name (cpp_reader *) ATTRIBUTE_PURE; extern const char *cpp_get_wide_charset_name (cpp_reader *) ATTRIBUTE_PURE; +extern location_t cpp_get_diagnostic_override_loc (const cpp_reader *); + /* This function reads the file, but does not start preprocessing. It returns the name of the original file; this is the same as the input file, except for preprocessed input. This will generate at diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index 75cc1ad..21a59af 100644 --- a/libcpp/include/line-map.h +++ b/libcpp/include/line-map.h @@ -1111,6 +1111,10 @@ extern location_t linemap_module_loc extern void linemap_module_reparent (line_maps *, location_t loc, location_t new_parent); +/* TRUE iff the location comes from a module import. */ +extern bool linemap_location_from_module_p + (const line_maps *, location_t); + /* Restore the linemap state such that the map at LWM-1 continues. Return start location of the new map. */ extern location_t linemap_module_restore @@ -1280,7 +1284,7 @@ linemap_location_before_p (const line_maps *set, return linemap_compare_locations (set, loc_a, loc_b) >= 0; } -typedef struct +struct expanded_location { /* The name of the source file involved. */ const char *file; @@ -1294,7 +1298,18 @@ typedef struct /* In a system header?. */ bool sysp; -} expanded_location; +}; + +extern bool +operator== (const expanded_location &a, + const expanded_location &b); +inline bool +operator!= (const expanded_location &a, + const expanded_location &b) +{ + return !(a == b); +} + /* This is enum is used by the function linemap_resolve_location below. The meaning of the values is explained in the comment of |