aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/analysis-plan.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/analyzer/analysis-plan.cc')
-rw-r--r--gcc/analyzer/analysis-plan.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/analyzer/analysis-plan.cc b/gcc/analyzer/analysis-plan.cc
index 7dfc48e..57a6dcb 100644
--- a/gcc/analyzer/analysis-plan.cc
+++ b/gcc/analyzer/analysis-plan.cc
@@ -109,6 +109,10 @@ analysis_plan::use_summary_p (const cgraph_edge *edge) const
if (!flag_analyzer_call_summaries)
return false;
+ /* Don't use call summaries if there is no callgraph edge */
+ if (!edge || !edge->callee)
+ return false;
+
/* TODO: don't count callsites each time. */
int num_call_sites = 0;
const cgraph_node *callee = edge->callee;