clang 24.0.0git
clang::api_notes::APINotesReader::Implementation Class Reference

Public Types

using SerializedIdentifierTable
using SerializedContextIDTable
using SerializedContextInfoTable
using SerializedObjCPropertyTable
using SerializedFieldTable
using SerializedObjCMethodTable
using SerializedCXXMethodTable
using SerializedObjCSelectorTable
using SerializedGlobalVariableTable
using SerializedGlobalFunctionTable
using SerializedEnumConstantTable
using SerializedTagTable = llvm::OnDiskIterableChainedHashTable<TagTableInfo>
using SerializedTypedefTable

Public Member Functions

std::optional< IdentifierIDgetIdentifier (llvm::StringRef Str)
 Retrieve the identifier ID for the given string, or an empty optional if the string is unknown.
std::optional< llvm::StringRef > getIdentifierString (IdentifierID ID)
 Retrieve the identifier string for the given ID, or an empty optional if the ID is unknown.
template<typename TableT>
void collectExactFunctionParameterSelectors (TableT &Table, llvm::SmallVectorImpl< APINotesFunctionSelectorKey > &Selectors)
 Collect exact parameter selector keys stored in the given function-like table.
std::optional< SelectorIDgetSelector (ObjCSelectorRef Selector)
 Retrieve the selector ID for the given selector, or an empty optional if the string is unknown.
llvm::Error readControlBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
llvm::Error readIdentifierBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
llvm::Error readContextBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
llvm::Error readObjCPropertyBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
llvm::Error readObjCMethodBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
llvm::Error readCXXMethodBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
llvm::Error readFieldBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
llvm::Error readObjCSelectorBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
llvm::Error readGlobalVariableBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
std::optional< FunctionTableKeygetFunctionKey (uint32_t ParentContextID, llvm::StringRef Name)
template<typename ParameterT>
std::optional< FunctionTableKeygetFunctionKey (uint32_t ParentContextID, llvm::StringRef Name, llvm::ArrayRef< ParameterT > Parameters)
std::optional< FunctionTableKeygetFunctionKey (std::optional< Context > ParentContext, llvm::StringRef Name)
template<typename ParameterT>
std::optional< FunctionTableKeygetFunctionKey (std::optional< Context > ParentContext, llvm::StringRef Name, llvm::ArrayRef< ParameterT > Parameters)
llvm::Error readGlobalFunctionBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
llvm::Error readEnumConstantBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
llvm::Error readTagBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)
llvm::Error readTypedefBlock (llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl< uint64_t > &Scratch)

Public Attributes

llvm::MemoryBuffer * InputBuffer
 The input buffer for the API notes data.
llvm::VersionTuple SwiftVersion
 The Swift version to use for filtering.
std::string ModuleName
 The name of the module that we read from the control block.
std::optional< std::pair< off_t, time_t > > SourceFileSizeAndModTime
std::unique_ptr< SerializedIdentifierTableIdentifierTable
 The identifier table.
std::optional< llvm::DenseMap< uint32_t, llvm::StringRef > > IdentifierStrings
 Lazy reverse lookup cache from identifier ID to string.
std::unique_ptr< SerializedContextIDTableContextIDTable
 The Objective-C / C++ context ID table.
std::unique_ptr< SerializedContextInfoTableContextInfoTable
 The Objective-C context info table.
std::unique_ptr< SerializedObjCPropertyTableObjCPropertyTable
 The Objective-C property table.
std::unique_ptr< SerializedFieldTableFieldTable
 The C record field table.
std::unique_ptr< SerializedObjCMethodTableObjCMethodTable
 The Objective-C method table.
std::unique_ptr< SerializedCXXMethodTableCXXMethodTable
 The C++ method table.
std::unique_ptr< SerializedObjCSelectorTableObjCSelectorTable
 The Objective-C selector table.
std::unique_ptr< SerializedGlobalVariableTableGlobalVariableTable
 The global variable table.
std::unique_ptr< SerializedGlobalFunctionTableGlobalFunctionTable
 The global function table.
std::unique_ptr< SerializedEnumConstantTableEnumConstantTable
 The enumerator table.
std::unique_ptr< SerializedTagTableTagTable
 The tag table.
std::unique_ptr< SerializedTypedefTableTypedefTable
 The typedef table.

Detailed Description

Definition at line 744 of file APINotesReader.cpp.

Member Typedef Documentation

◆ SerializedContextIDTable

Initial value:
llvm::OnDiskIterableChainedHashTable<ContextIDTableInfo>

Definition at line 768 of file APINotesReader.cpp.

◆ SerializedContextInfoTable

Initial value:
llvm::OnDiskIterableChainedHashTable<ContextInfoTableInfo>

Definition at line 774 of file APINotesReader.cpp.

◆ SerializedCXXMethodTable

Initial value:
llvm::OnDiskIterableChainedHashTable<CXXMethodTableInfo>

Definition at line 798 of file APINotesReader.cpp.

◆ SerializedEnumConstantTable

Initial value:
llvm::OnDiskIterableChainedHashTable<EnumConstantTableInfo>

Definition at line 822 of file APINotesReader.cpp.

◆ SerializedFieldTable

Initial value:
llvm::OnDiskIterableChainedHashTable<FieldTableInfo>

Definition at line 786 of file APINotesReader.cpp.

◆ SerializedGlobalFunctionTable

Initial value:
llvm::OnDiskIterableChainedHashTable<GlobalFunctionTableInfo>

Definition at line 816 of file APINotesReader.cpp.

◆ SerializedGlobalVariableTable

Initial value:
llvm::OnDiskIterableChainedHashTable<GlobalVariableTableInfo>

Definition at line 810 of file APINotesReader.cpp.

◆ SerializedIdentifierTable

Initial value:
llvm::OnDiskIterableChainedHashTable<IdentifierTableInfo>

Definition at line 759 of file APINotesReader.cpp.

◆ SerializedObjCMethodTable

Initial value:
llvm::OnDiskIterableChainedHashTable<ObjCMethodTableInfo>

Definition at line 792 of file APINotesReader.cpp.

◆ SerializedObjCPropertyTable

Initial value:
llvm::OnDiskIterableChainedHashTable<ObjCPropertyTableInfo>

Definition at line 780 of file APINotesReader.cpp.

◆ SerializedObjCSelectorTable

Initial value:
llvm::OnDiskIterableChainedHashTable<ObjCSelectorTableInfo>

Definition at line 804 of file APINotesReader.cpp.

◆ SerializedTagTable

using clang::api_notes::APINotesReader::Implementation::SerializedTagTable = llvm::OnDiskIterableChainedHashTable<TagTableInfo>

Definition at line 828 of file APINotesReader.cpp.

◆ SerializedTypedefTable

Initial value:
llvm::OnDiskIterableChainedHashTable<TypedefTableInfo>

Definition at line 833 of file APINotesReader.cpp.

Member Function Documentation

◆ collectExactFunctionParameterSelectors()

template<typename TableT>
void clang::api_notes::APINotesReader::Implementation::collectExactFunctionParameterSelectors ( TableT & Table,
llvm::SmallVectorImpl< APINotesFunctionSelectorKey > & Selectors )

Collect exact parameter selector keys stored in the given function-like table.

Definition at line 947 of file APINotesReader.cpp.

Referenced by clang::api_notes::APINotesReader::collectExactFunctionParameterSelectors().

◆ getFunctionKey() [1/4]

std::optional< FunctionTableKey > clang::api_notes::APINotesReader::Implementation::getFunctionKey ( std::optional< Context > ParentContext,
llvm::StringRef Name )

Definition at line 979 of file APINotesReader.cpp.

References getFunctionKey().

◆ getFunctionKey() [2/4]

template<typename ParameterT>
std::optional< FunctionTableKey > clang::api_notes::APINotesReader::Implementation::getFunctionKey ( std::optional< Context > ParentContext,
llvm::StringRef Name,
llvm::ArrayRef< ParameterT > Parameters )

Definition at line 987 of file APINotesReader.cpp.

References getFunctionKey().

◆ getFunctionKey() [3/4]

◆ getFunctionKey() [4/4]

template<typename ParameterT>
std::optional< FunctionTableKey > clang::api_notes::APINotesReader::Implementation::getFunctionKey ( uint32_t ParentContextID,
llvm::StringRef Name,
llvm::ArrayRef< ParameterT > Parameters )

Definition at line 971 of file APINotesReader.cpp.

References clang::api_notes::getFunctionKeyImpl(), and getIdentifier().

◆ getIdentifier()

◆ getIdentifierString()

std::optional< llvm::StringRef > clang::api_notes::APINotesReader::Implementation::getIdentifierString ( IdentifierID ID)

Retrieve the identifier string for the given ID, or an empty optional if the ID is unknown.

Definition at line 915 of file APINotesReader.cpp.

References IdentifierStrings, and IdentifierTable.

Referenced by clang::api_notes::APINotesReader::getParameterSelectorSpellingsForDiagnostics().

◆ getSelector()

std::optional< SelectorID > clang::api_notes::APINotesReader::Implementation::getSelector ( ObjCSelectorRef Selector)

Retrieve the selector ID for the given selector, or an empty optional if the string is unknown.

Definition at line 996 of file APINotesReader.cpp.

References getIdentifier(), clang::api_notes::StoredObjCSelector::Identifiers, IdentifierTable, clang::api_notes::StoredObjCSelector::NumArgs, and ObjCSelectorTable.

Referenced by clang::api_notes::APINotesReader::lookupObjCMethod().

◆ readContextBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readContextBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

◆ readControlBlock()

◆ readCXXMethodBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readCXXMethodBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

◆ readEnumConstantBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readEnumConstantBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

◆ readFieldBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readFieldBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

◆ readGlobalFunctionBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readGlobalFunctionBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

◆ readGlobalVariableBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readGlobalVariableBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

◆ readIdentifierBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readIdentifierBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

◆ readObjCMethodBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readObjCMethodBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

◆ readObjCPropertyBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readObjCPropertyBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

◆ readObjCSelectorBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readObjCSelectorBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

◆ readTagBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readTagBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

◆ readTypedefBlock()

llvm::Error clang::api_notes::APINotesReader::Implementation::readTypedefBlock ( llvm::BitstreamCursor & Cursor,
llvm::SmallVectorImpl< uint64_t > & Scratch )

Member Data Documentation

◆ ContextIDTable

std::unique_ptr<SerializedContextIDTable> clang::api_notes::APINotesReader::Implementation::ContextIDTable

◆ ContextInfoTable

std::unique_ptr<SerializedContextInfoTable> clang::api_notes::APINotesReader::Implementation::ContextInfoTable

◆ CXXMethodTable

std::unique_ptr<SerializedCXXMethodTable> clang::api_notes::APINotesReader::Implementation::CXXMethodTable

◆ EnumConstantTable

std::unique_ptr<SerializedEnumConstantTable> clang::api_notes::APINotesReader::Implementation::EnumConstantTable

The enumerator table.

Definition at line 826 of file APINotesReader.cpp.

Referenced by clang::api_notes::APINotesReader::lookupEnumConstant(), and readEnumConstantBlock().

◆ FieldTable

std::unique_ptr<SerializedFieldTable> clang::api_notes::APINotesReader::Implementation::FieldTable

The C record field table.

Definition at line 790 of file APINotesReader.cpp.

Referenced by clang::api_notes::APINotesReader::lookupField(), and readFieldBlock().

◆ GlobalFunctionTable

std::unique_ptr<SerializedGlobalFunctionTable> clang::api_notes::APINotesReader::Implementation::GlobalFunctionTable

◆ GlobalVariableTable

std::unique_ptr<SerializedGlobalVariableTable> clang::api_notes::APINotesReader::Implementation::GlobalVariableTable

The global variable table.

Definition at line 814 of file APINotesReader.cpp.

Referenced by clang::api_notes::APINotesReader::lookupGlobalVariable(), and readGlobalVariableBlock().

◆ IdentifierStrings

std::optional<llvm::DenseMap<uint32_t, llvm::StringRef> > clang::api_notes::APINotesReader::Implementation::IdentifierStrings

Lazy reverse lookup cache from identifier ID to string.

Definition at line 766 of file APINotesReader.cpp.

Referenced by getIdentifierString().

◆ IdentifierTable

std::unique_ptr<SerializedIdentifierTable> clang::api_notes::APINotesReader::Implementation::IdentifierTable

The identifier table.

Definition at line 763 of file APINotesReader.cpp.

Referenced by getIdentifier(), getIdentifierString(), getSelector(), and readIdentifierBlock().

◆ InputBuffer

llvm::MemoryBuffer* clang::api_notes::APINotesReader::Implementation::InputBuffer

The input buffer for the API notes data.

Definition at line 747 of file APINotesReader.cpp.

Referenced by clang::api_notes::APINotesReader::~APINotesReader().

◆ ModuleName

std::string clang::api_notes::APINotesReader::Implementation::ModuleName

The name of the module that we read from the control block.

Definition at line 753 of file APINotesReader.cpp.

Referenced by readControlBlock().

◆ ObjCMethodTable

std::unique_ptr<SerializedObjCMethodTable> clang::api_notes::APINotesReader::Implementation::ObjCMethodTable

The Objective-C method table.

Definition at line 796 of file APINotesReader.cpp.

Referenced by clang::api_notes::APINotesReader::lookupObjCMethod(), and readObjCMethodBlock().

◆ ObjCPropertyTable

std::unique_ptr<SerializedObjCPropertyTable> clang::api_notes::APINotesReader::Implementation::ObjCPropertyTable

The Objective-C property table.

Definition at line 784 of file APINotesReader.cpp.

Referenced by clang::api_notes::APINotesReader::lookupObjCProperty(), and readObjCPropertyBlock().

◆ ObjCSelectorTable

std::unique_ptr<SerializedObjCSelectorTable> clang::api_notes::APINotesReader::Implementation::ObjCSelectorTable

The Objective-C selector table.

Definition at line 808 of file APINotesReader.cpp.

Referenced by getSelector(), and readObjCSelectorBlock().

◆ SourceFileSizeAndModTime

std::optional<std::pair<off_t, time_t> > clang::api_notes::APINotesReader::Implementation::SourceFileSizeAndModTime

Definition at line 757 of file APINotesReader.cpp.

Referenced by readControlBlock().

◆ SwiftVersion

◆ TagTable

std::unique_ptr<SerializedTagTable> clang::api_notes::APINotesReader::Implementation::TagTable

The tag table.

Definition at line 831 of file APINotesReader.cpp.

Referenced by clang::api_notes::APINotesReader::lookupTag(), and readTagBlock().

◆ TypedefTable

std::unique_ptr<SerializedTypedefTable> clang::api_notes::APINotesReader::Implementation::TypedefTable

The typedef table.

Definition at line 837 of file APINotesReader.cpp.

Referenced by clang::api_notes::APINotesReader::lookupTypedef(), and readTypedefBlock().


The documentation for this class was generated from the following file: