aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2016-07-27 17:21:20 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2016-07-27 17:21:20 +0000
commita01fc54920d7d722eb9efc29156fe4a823d21265 (patch)
treee95187d29ed6854ea7491bfd9df3af7b2456d81d /gcc/tree.h
parent182f2f648a9bb55a4be594e4b9e6531fdea1a464 (diff)
downloadgcc-a01fc54920d7d722eb9efc29156fe4a823d21265.zip
gcc-a01fc54920d7d722eb9efc29156fe4a823d21265.tar.gz
gcc-a01fc54920d7d722eb9efc29156fe4a823d21265.tar.bz2
Move make_location from tree.h/c to input.h/c
For some reason I added make_location and some related functions to tree.h/c, rather than to input.h/c. Move them there, so we can use them without requiring tree, and add some selftest coverage. gcc/ChangeLog: * input.c (get_pure_location): Move here from tree.c. (make_location): Likewise. Add header comment. (selftest::test_accessing_ordinary_linemaps): Verify pure_location_p, make_location, get_location_from_adhoc_loc and get_range_from_loc. * input.h (get_pure_location): Move declaration here from tree.h. (get_finish): Likewise for inline function. (make_location): Likewise for declaration. * tree.c (get_pure_location): Move to input.c. (make_location): Likewise. * tree.h (get_pure_location): Move declaration to tree.h. (get_finish): Likewise for inline function. (make_location): Likewise for declaration. libcpp/ChangeLog: * include/line-map.h (source_location): Fix line numbers in comment. From-SVN: r238792
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index e2ffabf..14c8f7a 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -5425,16 +5425,6 @@ type_with_alias_set_p (const_tree t)
return false;
}
-extern location_t get_pure_location (location_t loc);
-
-/* Get the endpoint of any range encoded within location LOC. */
-
-static inline location_t
-get_finish (location_t loc)
-{
- return get_range_from_loc (line_table, loc).m_finish;
-}
-
extern location_t set_block (location_t loc, tree block);
extern void gt_ggc_mx (tree &);
@@ -5457,9 +5447,6 @@ get_decl_source_range (tree decl)
return get_range_from_loc (line_table, loc);
}
-extern location_t
-make_location (location_t caret, location_t start, location_t finish);
-
/* Return true if it makes sense to promote/demote from_type to to_type. */
inline bool
desired_pro_or_demotion_p (const_tree to_type, const_tree from_type)