File tree Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -425,26 +425,16 @@ void ci_lazy_methodst::get_virtual_method_targets(
425
425
!call_basename.empty (),
426
426
" Virtual function must have a reasonable name after removing class" );
427
427
428
- const irep_idt &self_method =
429
- get_virtual_method_target (
430
- instantiated_classes, call_basename, call_class, symbol_table );
428
+ class_hierarchyt::idst self_and_child_classes =
429
+ class_hierarchy. get_children_trans (call_class);
430
+ self_and_child_classes. push_back ( call_class);
431
431
432
- if (!self_method. empty () )
432
+ for ( const irep_idt &class_name : self_and_child_classes )
433
433
{
434
- callable_methods.push_back (self_method);
435
- }
436
-
437
- const auto child_classes=class_hierarchy.get_children_trans (call_class);
438
- for (const auto &child_class : child_classes)
439
- {
440
- const auto child_method=
441
- get_virtual_method_target (
442
- instantiated_classes,
443
- call_basename,
444
- child_class,
445
- symbol_table);
446
- if (!child_method.empty ())
447
- callable_methods.push_back (child_method);
434
+ const irep_idt method_name = get_virtual_method_target (
435
+ instantiated_classes, call_basename, class_name, symbol_table);
436
+ if (!method_name.empty ())
437
+ callable_methods.push_back (method_name);
448
438
}
449
439
}
450
440
You can’t perform that action at this time.
0 commit comments