File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,15 @@ string_dependenciest::get_node(const array_string_exprt &e)
333333 return string_nodes.back ();
334334}
335335
336+ std::unique_ptr<const string_dependenciest::string_nodet>
337+ string_dependenciest::node_at (const array_string_exprt &e) const
338+ {
339+ const auto &it = node_index_pool.find (e);
340+ if (it != node_index_pool.end ())
341+ return util_make_unique<const string_nodet>(string_nodes.at (it->second ));
342+ return {};
343+ }
344+
336345string_dependenciest::builtin_function_nodet string_dependenciest::make_node (
337346 std::unique_ptr<string_builtin_functiont> &builtin_function)
338347{
Original file line number Diff line number Diff line change @@ -287,6 +287,9 @@ class string_dependenciest
287287
288288 string_nodet &get_node (const array_string_exprt &e);
289289
290+ std::unique_ptr<const string_nodet>
291+ node_at (const array_string_exprt &e) const ;
292+
290293 // / `builtin_function` is reset to an empty pointer after the node is created
291294 builtin_function_nodet
292295 make_node (std::unique_ptr<string_builtin_functiont> &builtin_function);
You can’t perform that action at this time.
0 commit comments