|
clang 22.0.0git
|
Manages entity name interning and provides efficient EntityId handles. More...
#include "clang/Analysis/Scalable/Model/EntityIdTable.h"
Public Member Functions | |
| EntityIdTable ()=default | |
| EntityId | getId (const EntityName &Name) |
| Creates or retrieves an EntityId for the given EntityName. | |
| bool | contains (const EntityName &Name) const |
| Returns true if an entity with the given name exists in the table. | |
| void | forEach (llvm::function_ref< void(const EntityName &, EntityId)> Callback) const |
| Invokes the callback for each entity in the table. | |
| size_t | count () const |
| Returns the number of unique entities in the table. | |
Manages entity name interning and provides efficient EntityId handles.
The table maps each unique EntityName to exactly one EntityId. Entities are never removed.
Definition at line 23 of file EntityIdTable.h.
|
default |
| bool clang::ssaf::EntityIdTable::contains | ( | const EntityName & | Name | ) | const |
Returns true if an entity with the given name exists in the table.
Definition at line 20 of file EntityIdTable.cpp.
|
inline |
Returns the number of unique entities in the table.
Definition at line 45 of file EntityIdTable.h.
| void clang::ssaf::EntityIdTable::forEach | ( | llvm::function_ref< void(const EntityName &, EntityId)> | Callback | ) | const |
Invokes the callback for each entity in the table.
Iteration order is unspecified.
Definition at line 24 of file EntityIdTable.cpp.
| EntityId clang::ssaf::EntityIdTable::getId | ( | const EntityName & | Name | ) |
Creates or retrieves an EntityId for the given EntityName.
If the entity already exists in the table, returns its existing Id. Otherwise, creates and returns a new Id. This operation is idempotent.
Definition at line 14 of file EntityIdTable.cpp.