clang: clang::IdentifierTable Class Reference (original) (raw)
Implements an efficient mapping from strings to IdentifierInfo nodes. More...
#include "[clang/Basic/IdentifierTable.h](IdentifierTable%5F8h%5Fsource.html)"
Public Member Functions | |
---|---|
IdentifierTable (IdentifierInfoLookup *ExternalLookup=nullptr) | |
Create the identifier table. | |
IdentifierTable (const LangOptions &LangOpts, IdentifierInfoLookup *ExternalLookup=nullptr) | |
Create the identifier table, populating it with info about the language keywords for the language specified by LangOpts. | |
void | setExternalIdentifierLookup (IdentifierInfoLookup *IILookup) |
Set the external identifier lookup mechanism. | |
IdentifierInfoLookup * | getExternalIdentifierLookup () const |
Retrieve the external identifier lookup object, if any. | |
llvm::BumpPtrAllocator & | getAllocator () |
IdentifierInfo & | get (StringRef Name) |
Return the identifier token info for the specified named identifier. | |
IdentifierInfo & | get (StringRef Name, tok::TokenKind TokenCode) |
IdentifierInfo & | getOwn (StringRef Name) |
Gets an IdentifierInfo for the given name without consulting external sources. | |
iterator | begin () const |
iterator | end () const |
unsigned | size () const |
iterator | find (StringRef Name) const |
void | PrintStats () const |
Print some statistics to stderr that indicate how well the hashing is doing. | |
void | AddKeywords (const LangOptions &LangOpts) |
Populate the identifier table with info about the language keywords for the language specified by LangOpts. | |
diag::kind | getFutureCompatDiagKind (const IdentifierInfo &II, const LangOptions &LangOpts) |
Returns the correct diagnostic to issue for a future-compat diagnostic warning. | |
Implements an efficient mapping from strings to IdentifierInfo nodes.
This has no other purpose, but this is an extremely performance-critical piece of the code, as each occurrence of every identifier goes through here when lexed.
Definition at line 655 of file IdentifierTable.h.
◆ const_iterator
◆ iterator
◆ IdentifierTable() [2/2]
Create the identifier table, populating it with info about the language keywords for the language specified by LangOpts
.
Definition at line 69 of file IdentifierTable.cpp.
References AddKeywords().
◆ AddKeywords()
void IdentifierTable::AddKeywords | ( | const LangOptions & | LangOpts | ) |
---|
◆ begin()
iterator clang::IdentifierTable::begin ( ) const | inline |
---|
◆ end()
iterator clang::IdentifierTable::end ( ) const | inline |
---|
◆ find()
iterator clang::IdentifierTable::find ( StringRef Name) const | inline |
---|
◆ get() [1/2]
Return the identifier token info for the specified named identifier.
Definition at line 688 of file IdentifierTable.h.
References clang::IdentifierInfoLookup::get().
Referenced by clang::Sema::ActOnCapturedRegionStart(), clang::Sema::ActOnCharacterConstant(), clang::Sema::ActOnCompoundRequirement(), clang::Sema::ActOnCXXTypeid(), clang::SemaObjC::ActOnInstanceMessage(), clang::Sema::ActOnNumericConstant(), clang::SemaObjC::ActOnObjCBoolLiteral(), clang::SemaOpenMP::ActOnOpenMPInterchangeDirective(), clang::SemaOpenMP::ActOnOpenMPReverseDirective(), clang::SemaOpenMP::ActOnOpenMPTileDirective(), clang::SemaOpenMP::ActOnOpenMPUnrollDirective(), clang::SemaOpenMP::ActOnOpenMPUsesAllocatorClause(), clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), clang::Sema::ActOnStringLiteral(), AddCXXOperatorKeyword(), addFunctionPointerConversion(), clang::Sema::addImplicitTypedef(), AddKeyword(), AddKeywords(), clang::Sema::AddKnownFunctionAttributes(), AddNotableIdentifier(), AddObjCKeyValueCompletions(), AddObjCKeyword(), clang::Sema::BuildBuiltinCallExpr(), buildCapture(), buildCoroutineHandle(), clang::Sema::buildCoroutinePromise(), buildImplicitMapper(), clang::ASTContext::buildImplicitRecord(), clang::ASTContext::buildImplicitTypedef(), clang::SemaObjC::BuildIvarRefExpr(), buildMemberCall(), buildMemcpyForAssignmentOp(), BuildNonArrayForRange(), clang::SemaObjC::BuildObjCArrayLiteral(), clang::SemaObjC::BuildObjCBoxedExpr(), clang::SemaObjC::BuildObjCDictionaryLiteral(), clang::SemaObjC::BuildObjCStringLiteral(), buildSingleCopyAssignRecursively(), buildStdNoThrowDeclRef(), clang::CodeGen::CGCXXABI::buildThisParam(), buildVarDecl(), CheckKeyForObjCARCConversion(), clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), CheckProtocolMethodDefs(), cleanupDeallocOrFinalize(), configureBlocksRuntimeObject(), constructBufferConceptDecl(), clang::SelectorTable::constructSetterSelector(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateBuiltinBinOp(), CreateHexagonBuiltinVaListDecl(), clang::ObjCMethodDecl::createImplicitParams(), CreatePowerABIBuiltinVaListDecl(), clang::SemaObjC::CreatePropertyDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), CreateXtensaABIBuiltinVaListDecl(), CXXRecordMembersNamed(), clang::Sema::DeclareGlobalNewDelete(), clang::ASTReader::DecodeIdentifierInfo(), clang::Sema::DefaultLvalueConversion(), DiagnoseDirectIsaAccess(), emitOutlinedFunctionPrologue(), emitReplacement(), clang::ExternalSource::FindExternalVisibleDeclsByName(), findOMPAllocatorHandleT(), findOMPAlloctraitT(), findOMPDependT(), findOMPEventHandleT(), GCRewriteFinalize(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), clang::ASTContext::getBlockDescriptorExtendedType(), clang::ASTContext::getBlockDescriptorType(), clang::ASTContext::getBoolName(), clang::ASTContext::getBuiltinCommonTypeName(), clang::ASTContext::getCFConstantStringDecl(), clang::ObjCPropertyDecl::getDefaultSynthIvarName(), getGlobalStreamPointerByName(), clang::Preprocessor::getIdentifierInfo(), clang::getKeywordSelector(), getLambdaStaticInvokers(), clang::ASTContext::getMakeIntegerSeqName(), clang::NSAPI::getNSArraySelector(), clang::NSAPI::getNSClassId(), clang::ASTContext::getNSCopyingName(), clang::NSAPI::getNSDictionarySelector(), getNSNumberFactoryMethod(), clang::NSAPI::getNSNumberLiteralSelector(), clang::ASTContext::getNSObjectName(), clang::NSAPI::getNSSetSelector(), clang::NSAPI::getNSStringSelector(), clang::GetNullarySelector(), clang::ASTContext::getObjCProtocolDecl(), getOpenCLEnumType(), getOpenCLTypedefType(), clang::Sema::getOrCreateStdNamespace(), clang::Sema::getSuperIdentifier(), clang::ASTContext::getTypePackElementName(), clang::GetUnarySelector(), handleAvailabilityAttr(), handleFormatAttr(), handleOwnershipAttr(), hasMember(), hasTypedefNamed(), clang::ASTImporter::Import(), clang::Parser::Initialize(), clang::Sema::Initialize(), clang::Builtin::Context::initializeBuiltins(), clang::HLSLExternalSemaSource::InitializeSema(), clang::Sema::InventAbbreviatedTemplateParameterTypeName(), clang::SemaObjC::isCFStringType(), isImplicitMapperNeeded(), clang::SemaObjC::isKnownName(), isMacroDefined(), clang::Preprocessor::isMacroDefined(), clang::NSAPI::isMacroDefined(), isNSStringType(), clang::SemaObjC::isNSStringType(), clang::Sema::isStdInitializerList(), IsValidIdentifier(), isValidInteropVariable(), clang::CompilerInstance::loadModule(), lookupBuiltinFunction(), lookupCoroutineHandleType(), clang::Sema::lookupCoroutineTraits(), lookupCXXRecordDecl(), clang::Sema::LookupInlineAsmField(), clang::Sema::LookupInlineAsmVarDeclField(), clang::LookupNamed(), clang::LookupNamespace(), LookupPredefedObjCSuperType(), lookupPromiseType(), LookupStdInitializerList(), lookupStdNamespace(), LookupStdSourceLocationImpl(), lookupStdTypeTraitMember(), markUsedForAliasOrIfunc(), mergeDeclAttribute(), ProcessAPINotes(), processImplicitMapsWithDefaultMappers(), PropertyMemoryAttribute(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), shouldRunOnFunctionOrMethod(), clang::syntax::tokenize(), and transferARCOwnershipToDeclaratorChunk().
◆ get() [2/2]
◆ getAllocator()
llvm::BumpPtrAllocator & clang::IdentifierTable::getAllocator ( ) | inline |
---|
◆ getExternalIdentifierLookup()
◆ getFutureCompatDiagKind()
◆ getOwn()
IdentifierInfo & clang::IdentifierTable::getOwn ( StringRef Name) | inline |
---|
◆ PrintStats()
void IdentifierTable::PrintStats | ( | ) | const |
---|
◆ setExternalIdentifierLookup()
◆ size()
unsigned clang::IdentifierTable::size ( ) const | inline |
---|
The documentation for this class was generated from the following files:
- include/clang/Basic/IdentifierTable.h
- lib/Basic/IdentifierTable.cpp