File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,19 @@ static void build_ssa_identifier_rec(
78
78
assert (false );
79
79
}
80
80
81
+ /* Used to determine whether or not an identifier can be built
82
+ * before trying and getting an exception */
83
+ bool ssa_exprt::can_build_identifier (const exprt &expr)
84
+ {
85
+ if (expr.id ()==ID_symbol)
86
+ return true ;
87
+ else if (expr.id ()==ID_member ||
88
+ expr.id ()==ID_index)
89
+ return can_build_identifier (expr.op0 ());
90
+ else
91
+ return false ;
92
+ }
93
+
81
94
/* ******************************************************************\
82
95
83
96
Function: ssa_exprt::build_identifier
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ class ssa_exprt:public symbol_exprt
64
64
65
65
const irep_idt get_l1_object_identifier () const
66
66
{
67
- #if 0
67
+ #if 1
68
68
return get_l1_object ().get_identifier ();
69
69
#else
70
70
// the above is the clean version, this is the fast one, using
@@ -134,6 +134,10 @@ class ssa_exprt:public symbol_exprt
134
134
const irep_idt &l0,
135
135
const irep_idt &l1,
136
136
const irep_idt &l2);
137
+
138
+ /* Used to determine whether or not an identifier can be built
139
+ * before trying and getting an exception */
140
+ static bool can_build_identifier (const exprt &src);
137
141
};
138
142
139
143
/* ! \brief Cast a generic exprt to an \ref ssa_exprt
You can’t perform that action at this time.
0 commit comments