GCC Middle and Back End API Reference
|
#include <logical-location.h>
Data Structures | |
class | key |
Public Member Functions | |
virtual | ~logical_location_manager () |
virtual const char * | get_short_name (key k) const =0 |
virtual const char * | get_name_with_scope (key k) const =0 |
virtual const char * | get_internal_name (key k) const =0 |
virtual enum logical_location_kind | get_kind (key k) const =0 |
virtual label_text | get_name_for_path_output (key k) const =0 |
virtual key | get_parent (key k) const =0 |
bool | function_p (key k) const |
We want to efficiently support passing around logical locations in the diagnostics subsystem, such as: - "within function 'foo'", or - "within method 'bar'" However we want to do this *without* requiring knowledge of trees (or of libgdiagnostics internals), and without requiring heap allocation of an interface class when emitting a diagnostic. To do this, we split the implementation into logical_location, which is a wrapper around a (const void *), and logical_location_manager which is provided by the client and has vfunc hooks for interpreting logical_location instances. Every logical_location is associated with a logical_location_manager and only has meaning in relation to that manager. A "nullptr" within a logical_location means "no logical location". See tree-logical-location.h for concrete subclasses relating to trees, where the pointer is a const_tree. See selftest-logical-location.h for a concrete subclass for selftests.
Abstract base class for giving meaning to logical_location values. Typically there will just be one client-provided instance, of a client-specific subclass.
|
inlinevirtual |
class logical_location_manager.
Return true iff this is a function or method.
References function, gcc_unreachable, get_kind(), member, module_, namespace_, parameter, return_type, type, unknown, and variable.
|
pure virtual |
Implemented in impl_logical_location_manager, and tree_logical_location_manager.
|
pure virtual |
Implemented in impl_logical_location_manager, and tree_logical_location_manager.
Referenced by function_p().
|
pure virtual |
Implemented in impl_logical_location_manager, and tree_logical_location_manager.
|
pure virtual |
Implemented in impl_logical_location_manager, and tree_logical_location_manager.
Implemented in impl_logical_location_manager, and tree_logical_location_manager.
|
pure virtual |
Implemented in impl_logical_location_manager, and tree_logical_location_manager.