16 const auto Res = Entities.try_emplace(Name, Id);
17 return Res.first->second;
21 return Entities.find(Name) != Entities.end();
26 for (
const auto &NameIdPair : Entities) {
27 Callback(NameIdPair.first, NameIdPair.second);
bool contains(const EntityName &Name) const
Returns true if an entity with the given name exists in the table.
EntityId getId(const EntityName &Name)
Creates or retrieves an EntityId for the given EntityName.
void forEach(llvm::function_ref< void(const EntityName &, EntityId)> Callback) const
Invokes the callback for each entity in the table.
Lightweight opaque handle representing an entity in an EntityIdTable.
Uniquely identifies an entity in a program.