aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/program-point.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/analyzer/program-point.h')
-rw-r--r--gcc/analyzer/program-point.h35
1 files changed, 16 insertions, 19 deletions
diff --git a/gcc/analyzer/program-point.h b/gcc/analyzer/program-point.h
index 6084c9e..63f7224 100644
--- a/gcc/analyzer/program-point.h
+++ b/gcc/analyzer/program-point.h
@@ -174,7 +174,7 @@ public:
program_point (const function_point &fn_point,
const call_string &call_string)
: m_function_point (fn_point),
- m_call_string (call_string)
+ m_call_string (&call_string)
{
}
@@ -197,7 +197,7 @@ public:
/* Accessors. */
const function_point &get_function_point () const { return m_function_point; }
- const call_string &get_call_string () const { return m_call_string; }
+ const call_string &get_call_string () const { return *m_call_string; }
const supernode *get_supernode () const
{
@@ -242,23 +242,14 @@ public:
{
if (get_kind () == PK_ORIGIN)
return 0;
- return m_call_string.length () + 1;
+ return get_call_string ().length () + 1;
}
/* Factory functions for making various kinds of program_point. */
- static program_point origin ()
- {
- return program_point (function_point (NULL, NULL,
- 0, PK_ORIGIN),
- call_string ());
- }
-
- static program_point from_function_entry (const supergraph &sg,
- function *fun)
- {
- return program_point (function_point::from_function_entry (sg, fun),
- call_string ());
- }
+ static program_point origin (const region_model_manager &mgr);
+ static program_point from_function_entry (const region_model_manager &mgr,
+ const supergraph &sg,
+ function *fun);
static program_point before_supernode (const supernode *supernode,
const superedge *from_edge,
@@ -288,11 +279,11 @@ public:
static program_point empty ()
{
- return program_point (function_point::empty (), call_string ());
+ return program_point (function_point::empty ());
}
static program_point deleted ()
{
- return program_point (function_point::deleted (), call_string ());
+ return program_point (function_point::deleted ());
}
bool on_edge (exploded_graph &eg, const superedge *succ);
@@ -306,8 +297,14 @@ public:
program_point get_next () const;
private:
+ program_point (const function_point &fn_point)
+ : m_function_point (fn_point),
+ m_call_string (NULL)
+ {
+ }
+
function_point m_function_point;
- call_string m_call_string;
+ const call_string *m_call_string;
};
} // namespace ana