Skip to content

Commit b3ba2cc

Browse files
Remove Java dependency from remove_virtual_functions
1 parent 9d09ebc commit b3ba2cc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/goto-programs/remove_virtual_functions.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ void remove_virtual_functionst::get_child_functions_rec(
321321
if(findit==class_hierarchy.class_map.end())
322322
return;
323323

324+
const auto language = get_language_from_identifier(ns, this_id);
325+
CHECK_RETURN(language);
326+
const irep_idt root_base_class_type_name =
327+
language->root_base_class_type().get_identifier();
324328
for(const auto &child : findit->second.children)
325329
{
326330
// Skip if we have already visited this and we found a function call that
@@ -330,7 +334,7 @@ void remove_virtual_functionst::get_child_functions_rec(
330334
it != entry_map.end() &&
331335
!has_prefix(
332336
id2string(it->second.symbol_expr.get_identifier()),
333-
"java::java.lang.Object"))
337+
id2string(root_base_class_type_name)))
334338
{
335339
continue;
336340
}

0 commit comments

Comments
 (0)