aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2014-06-18 09:00:22 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2014-06-18 09:00:22 +0000
commita5852beabcf2e8c5bdfd6143191df3183c0db590 (patch)
treefff1f2d130096327303f4f0437fbb8ca6589d52a /gcc/tree.h
parent68f6df73324a1389bce336d55ae94aa58f519997 (diff)
downloadgcc-a5852beabcf2e8c5bdfd6143191df3183c0db590.zip
gcc-a5852beabcf2e8c5bdfd6143191df3183c0db590.tar.gz
gcc-a5852beabcf2e8c5bdfd6143191df3183c0db590.tar.bz2
improve sloc assignment on bind_expr entry/exit code
2014-06-18 Olivier Hainque <hainque@adacore.com> improve sloc assignment on bind_expr entry/exit code gcc/ * tree-core.h (tree_block): Add an "end_locus" field, allowing memorization of the end of block source location. * tree.h (BLOCK_SOURCE_END_LOCATION): New accessor. * gimplify.c (gimplify_bind_expr): Propagate the block start and end source location info we have on the block entry/exit code we generate. testsuite/ * gnat.dg/blocklocs.adb: New test. From-SVN: r211773
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 4a29aa2..0a334cc 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1500,6 +1500,11 @@ extern void protected_set_expr_location (tree, location_t);
#define BLOCK_SOURCE_LOCATION(NODE) (BLOCK_CHECK (NODE)->block.locus)
+/* This gives the location of the end of the block, useful to attach
+ code implicitly generated for outgoing paths. */
+
+#define BLOCK_SOURCE_END_LOCATION(NODE) (BLOCK_CHECK (NODE)->block.end_locus)
+
/* Define fields and accessors for nodes representing data types. */
/* See tree.def for documentation of the use of these fields.