clang API Documentation
#include <IdentifierTable.h>
Public Types | |
| typedef HashTableTy::const_iterator | iterator |
| typedef HashTableTy::const_iterator | const_iterator |
Public Member Functions | |
| IdentifierTable (const LangOptions &LangOpts, IdentifierInfoLookup *externalLookup=0) | |
| 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) |
| 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 |
| void | PrintStats () const |
| void | AddKeywords (const LangOptions &LangOpts) |
IdentifierTable - This table implements an efficient mapping from strings to IdentifierInfo nodes. It 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 405 of file IdentifierTable.h.
| typedef HashTableTy::const_iterator clang::IdentifierTable::const_iterator |
Definition at line 506 of file IdentifierTable.h.
| typedef HashTableTy::const_iterator clang::IdentifierTable::iterator |
Definition at line 505 of file IdentifierTable.h.
| IdentifierTable::IdentifierTable | ( | const LangOptions & | LangOpts, |
| IdentifierInfoLookup * | externalLookup = 0 |
||
| ) |
IdentifierTable ctor - Create the identifier table, populating it with info about the language keywords for the language specified by LangOpts.
Definition at line 73 of file IdentifierTable.cpp.
References AddKeywords().
| void IdentifierTable::AddKeywords | ( | const LangOptions & | LangOpts | ) |
AddKeywords - Add all keywords to the symbol table.
Definition at line 163 of file IdentifierTable.cpp.
References AddKeyword().
Referenced by IdentifierTable().
| iterator clang::IdentifierTable::begin | ( | ) | const [inline] |
Definition at line 508 of file IdentifierTable.h.
| iterator clang::IdentifierTable::end | ( | ) | const [inline] |
Definition at line 509 of file IdentifierTable.h.
| IdentifierInfo& clang::IdentifierTable::get | ( | StringRef | Name | ) | [inline] |
get - Return the identifier token info for the specified named identifier.
Definition at line 435 of file IdentifierTable.h.
References clang::IdentifierInfoLookup::get(), getAllocator(), and clang::IdentifierInfo::setImport().
Referenced by AddCXXOperatorKeyword(), AddKeyword(), AddObjCKeyValueCompletions(), AddObjCKeyword(), clang::ASTContext::BuildByRefType(), BuildImplicitMemberInitializer(), BuildSingleCopyAssign(), clang::CodeGen::CGCXXABI::BuildThisParam(), clang::Sema::CheckProtocolMethodDefs(), cleanupDeallocOrFinalize(), clang::Sema::CodeCompleteObjCPassingType(), clang::Sema::CodeCompleteObjCSuperMessage(), clang::SelectorTable::constructSetterName(), clang::ObjCMethodDecl::createImplicitParams(), clang::Sema::CreatePropertyDecl(), clang::ASTReader::DecodeIdentifierInfo(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), clang::Builtin::Context::ForgetBuiltin(), GCRewriteFinalize(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::idx::GlobalSelector::get(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::ASTContext::getBlockDescriptorExtendedType(), clang::ASTContext::getBlockDescriptorType(), clang::ASTContext::getCFConstantStringType(), clang::idx::EntityImpl::getDecl(), getDefaultSynthIvarName(), clang::idx::EntityGetter::getGlobalEntity(), clang::Preprocessor::getIdentifierInfo(), clang::ASTContext::getInt128Decl(), clang::arcmt::trans::getNilString(), GetNullarySelector(), clang::GetNullarySelector(), clang::ASTContext::getObjCClassDecl(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), clang::ASTContext::getObjCIdDecl(), clang::ASTContext::getObjCInstanceTypeDecl(), clang::ASTContext::getObjCProtocolDecl(), clang::ASTContext::getObjCSelDecl(), clang::Sema::getOrCreateStdNamespace(), clang::Sema::getPrintingPolicy(), clang::idx::GlobalSelector::getSelector(), clang::ASTContext::getUInt128Decl(), clang::GetUnarySelector(), handleIBOutletCollection(), clang::ASTImporter::Import(), clang::Parser::Initialize(), clang::Sema::Initialize(), clang::Builtin::Context::InitializeBuiltins(), isCFStringType(), isMacroDefined(), isNSStringType(), clang::Sema::isStdInitializerList(), KnownName(), LookupStdInitializerList(), MaybeAddSentinel(), shouldRunOnFunctionOrMethod(), transferARCOwnershipToDeclaratorChunk(), clang::idx::EntityGetter::VisitNamedDecl(), and clang::ento::ExprEngine::VisitObjCMessage().
| IdentifierInfo& clang::IdentifierTable::get | ( | StringRef | Name, |
| tok::TokenKind | TokenCode | ||
| ) | [inline] |
Definition at line 468 of file IdentifierTable.h.
| llvm::BumpPtrAllocator& clang::IdentifierTable::getAllocator | ( | ) | [inline] |
Definition at line 429 of file IdentifierTable.h.
| IdentifierInfoLookup* clang::IdentifierTable::getExternalIdentifierLookup | ( | ) | const [inline] |
Retrieve the external identifier lookup object, if any.
Definition at line 425 of file IdentifierTable.h.
| IdentifierInfo& clang::IdentifierTable::getOwn | ( | StringRef | Name | ) | [inline] |
Gets an IdentifierInfo for the given name without consulting external sources.
This is a version of get() meant for external sources that want to introduce or modify an identifier. If they called get(), they would likely end up in a recursion.
Definition at line 481 of file IdentifierTable.h.
References getAllocator(), and clang::IdentifierInfo::setImport().
| void IdentifierTable::PrintStats | ( | ) | const |
PrintStats - Print some statistics to stderr that indicate how well the hashing is doing.
PrintStats - Print statistics about how well the identifier table is doing at hashing identifiers.
Definition at line 245 of file IdentifierTable.cpp.
Referenced by clang::FrontendAction::EndSourceFile().
| void clang::IdentifierTable::setExternalIdentifierLookup | ( | IdentifierInfoLookup * | IILookup | ) | [inline] |
Set the external identifier lookup mechanism.
Definition at line 420 of file IdentifierTable.h.
| unsigned clang::IdentifierTable::size | ( | ) | const [inline] |
Definition at line 510 of file IdentifierTable.h.