Move make_location from tree.h/c to input.h/c
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 27 Jul 2016 17:21:20 +0000 (17:21 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Wed, 27 Jul 2016 17:21:20 +0000 (17:21 +0000)
commita01fc54920d7d722eb9efc29156fe4a823d21265
treee95187d29ed6854ea7491bfd9df3af7b2456d81d
parent182f2f648a9bb55a4be594e4b9e6531fdea1a464
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
gcc/ChangeLog
gcc/input.c
gcc/input.h
gcc/tree.c
gcc/tree.h
libcpp/ChangeLog
libcpp/include/line-map.h