aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c30
1 files changed, 5 insertions, 25 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 5e562a5..352c553 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -9224,32 +9224,12 @@ block_nonartificial_location (tree block)
location_t
tree_nonartificial_location (tree exp)
{
- tree block = TREE_BLOCK (exp);
+ location_t *loc = block_nonartificial_location (TREE_BLOCK (exp));
- while (block
- && TREE_CODE (block) == BLOCK
- && BLOCK_ABSTRACT_ORIGIN (block))
- {
- tree ao = BLOCK_ABSTRACT_ORIGIN (block);
-
- do
- {
- if (TREE_CODE (ao) == FUNCTION_DECL
- && DECL_DECLARED_INLINE_P (ao)
- && lookup_attribute ("artificial", DECL_ATTRIBUTES (ao)))
- return BLOCK_SOURCE_LOCATION (block);
- else if (TREE_CODE (ao) == BLOCK
- && BLOCK_SUPERCONTEXT (ao) != ao)
- ao = BLOCK_SUPERCONTEXT (ao);
- else
- break;
- }
- while (ao);
-
- block = BLOCK_SUPERCONTEXT (block);
- }
-
- return EXPR_LOCATION (exp);
+ if (loc)
+ return *loc;
+ else
+ return EXPR_LOCATION (exp);
}