aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog10
-rw-r--r--libcpp/include/line-map.h8
-rw-r--r--libcpp/line-map.c2
3 files changed, 18 insertions, 2 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index d583e98..19b9310 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -2,6 +2,16 @@
PR c/68473
PR c++/70105
+ * line-map.c (linemap_macro_map_loc_unwind_toward_spelling): Move
+ decl...
+ * include/line-map.h
+ (linemap_macro_map_loc_unwind_toward_spelling): ...here,
+ converting from static to extern.
+
+2016-03-09 David Malcolm <dmalcolm@redhat.com>
+
+ PR c/68473
+ PR c++/70105
* include/line-map.h (source_range::debug): Delete.
(struct location_range): Update comment. Replace
expanded_location fields "m_start", "m_finish", and "m_caret" with
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 13cc6f8..292abce 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -1066,6 +1066,14 @@ int linemap_location_in_system_header_p (struct line_maps *,
bool linemap_location_from_macro_expansion_p (const struct line_maps *,
source_location);
+/* With the precondition that LOCATION is the locus of a token that is
+ an argument of a function-like macro MACRO_MAP and appears in the
+ expansion of MACRO_MAP, return the locus of that argument in the
+ context of the caller of MACRO_MAP. */
+
+extern source_location linemap_macro_map_loc_unwind_toward_spelling
+ (line_maps *set, const line_map_macro *macro_map, source_location location);
+
/* source_location values from 0 to RESERVED_LOCATION_COUNT-1 will
be reserved for libcpp user as special values, no token from libcpp
will contain any of those locations. */
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index de6eafc..1fb634a 100644
--- a/libcpp/line-map.c
+++ b/libcpp/line-map.c
@@ -54,8 +54,6 @@ static const line_map_macro* linemap_macro_map_lookup (struct line_maps *,
source_location);
static source_location linemap_macro_map_loc_to_def_point
(const line_map_macro *, source_location);
-static source_location linemap_macro_map_loc_unwind_toward_spelling
-(line_maps *set, const line_map_macro *, source_location);
static source_location linemap_macro_map_loc_to_exp_point
(const line_map_macro *, source_location);
static source_location linemap_macro_loc_to_spelling_point