aboutsummaryrefslogtreecommitdiff
path: root/gcc/auto-profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/auto-profile.c')
-rw-r--r--gcc/auto-profile.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c
index 68abe32..f7ba32c 100644
--- a/gcc/auto-profile.c
+++ b/gcc/auto-profile.c
@@ -354,17 +354,10 @@ get_combined_location (location_t loc, tree decl)
static tree
get_function_decl_from_block (tree block)
{
- tree decl;
-
- if (LOCATION_LOCUS (BLOCK_SOURCE_LOCATION (block)) == UNKNOWN_LOCATION)
+ if (!inlined_function_outer_scope_p (block))
return NULL_TREE;
- for (decl = BLOCK_ABSTRACT_ORIGIN (block);
- decl && (TREE_CODE (decl) == BLOCK);
- decl = BLOCK_ABSTRACT_ORIGIN (decl))
- if (TREE_CODE (decl) == FUNCTION_DECL)
- break;
- return decl;
+ return BLOCK_ABSTRACT_ORIGIN (block);
}
/* Store inline stack for STMT in STACK. */