facebookexperimental / object-introspection

Object Introspection (OI) enables on-demand, hierarchical profiling of objects in arbitrary C/C++ programs with no recompilation.
Apache License 2.0
163 stars 14 forks source link

Handle stubbed types in NameProvider #477

Closed tyroguru closed 8 months ago

tyroguru commented 8 months ago

Summary

Stubbing out a type that is used in a template parameter (e.g., the first parameter in a unique_ptr - types that we actually recurse into) means that make_field will be called on the stubbed type. This fails as we have no NameProvider instantiation for this newly created stubbed type. This fix simply adds a template specialisation for any stubbed types in the NameProvider implementation.

Test plan

Tested internally.