clang 20.0.0git
|
A class that reads API notes data from a binary file that was written by the APINotesWriter
.
More...
#include "clang/APINotes/APINotesReader.h"
Classes | |
class | Implementation |
class | VersionedInfo |
Captures the completed versioned information for a particular part of API notes, including both unversioned API notes and each versioned API note for that particular entity. More... | |
Public Member Functions | |
~APINotesReader () | |
APINotesReader (const APINotesReader &)=delete | |
APINotesReader & | operator= (const APINotesReader &)=delete |
std::optional< ContextID > | lookupObjCClassID (llvm::StringRef Name) |
Look for the context ID of the given Objective-C class. | |
VersionedInfo< ContextInfo > | lookupObjCClassInfo (llvm::StringRef Name) |
Look for information regarding the given Objective-C class. | |
std::optional< ContextID > | lookupObjCProtocolID (llvm::StringRef Name) |
Look for the context ID of the given Objective-C protocol. | |
VersionedInfo< ContextInfo > | lookupObjCProtocolInfo (llvm::StringRef Name) |
Look for information regarding the given Objective-C protocol. | |
VersionedInfo< ObjCPropertyInfo > | lookupObjCProperty (ContextID CtxID, llvm::StringRef Name, bool IsInstance) |
Look for information regarding the given Objective-C property in the given context. | |
VersionedInfo< ObjCMethodInfo > | lookupObjCMethod (ContextID CtxID, ObjCSelectorRef Selector, bool IsInstanceMethod) |
Look for information regarding the given Objective-C method in the given context. | |
VersionedInfo< FieldInfo > | lookupField (ContextID CtxID, llvm::StringRef Name) |
Look for information regarding the given field of a C struct. | |
VersionedInfo< CXXMethodInfo > | lookupCXXMethod (ContextID CtxID, llvm::StringRef Name) |
Look for information regarding the given C++ method in the given C++ tag context. | |
VersionedInfo< GlobalVariableInfo > | lookupGlobalVariable (llvm::StringRef Name, std::optional< Context > Ctx=std::nullopt) |
Look for information regarding the given global variable. | |
VersionedInfo< GlobalFunctionInfo > | lookupGlobalFunction (llvm::StringRef Name, std::optional< Context > Ctx=std::nullopt) |
Look for information regarding the given global function. | |
VersionedInfo< EnumConstantInfo > | lookupEnumConstant (llvm::StringRef Name) |
Look for information regarding the given enumerator. | |
std::optional< ContextID > | lookupTagID (llvm::StringRef Name, std::optional< Context > ParentCtx=std::nullopt) |
Look for the context ID of the given C++ tag. | |
VersionedInfo< TagInfo > | lookupTag (llvm::StringRef Name, std::optional< Context > Ctx=std::nullopt) |
Look for information regarding the given tag (struct/union/enum/C++ class). | |
VersionedInfo< TypedefInfo > | lookupTypedef (llvm::StringRef Name, std::optional< Context > Ctx=std::nullopt) |
Look for information regarding the given typedef. | |
std::optional< ContextID > | lookupNamespaceID (llvm::StringRef Name, std::optional< ContextID > ParentNamespaceID=std::nullopt) |
Look for the context ID of the given C++ namespace. | |
Static Public Member Functions | |
static std::unique_ptr< APINotesReader > | Create (std::unique_ptr< llvm::MemoryBuffer > InputBuffer, llvm::VersionTuple SwiftVersion) |
Create a new API notes reader from the given member buffer, which contains the contents of a binary API notes file. | |
A class that reads API notes data from a binary file that was written by the APINotesWriter
.
Definition at line 28 of file APINotesReader.h.
clang::api_notes::APINotesReader::~APINotesReader | ( | ) |
Definition at line 1993 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::InputBuffer.
|
delete |
|
static |
Create a new API notes reader from the given member buffer, which contains the contents of a binary API notes file.
Definition at line 1996 of file APINotesReader.cpp.
auto clang::api_notes::APINotesReader::lookupCXXMethod | ( | ContextID | CtxID, |
llvm::StringRef | Name | ||
) |
Look for information regarding the given C++ method in the given C++ tag context.
CtxID | The ID that references the parent context, i.e. a C++ tag. |
Name | The name of the C++ method we're looking for. |
Definition at line 2164 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::CXXMethodTable, clang::api_notes::APINotesReader::Implementation::getIdentifier(), and clang::api_notes::APINotesReader::Implementation::SwiftVersion.
auto clang::api_notes::APINotesReader::lookupEnumConstant | ( | llvm::StringRef | Name | ) |
Look for information regarding the given enumerator.
Name | The name of the enumerator. |
Definition at line 2219 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::EnumConstantTable, clang::api_notes::APINotesReader::Implementation::getIdentifier(), and clang::api_notes::APINotesReader::Implementation::SwiftVersion.
auto clang::api_notes::APINotesReader::lookupField | ( | ContextID | CtxID, |
llvm::StringRef | Name | ||
) |
Look for information regarding the given field of a C struct.
Name | The name of the field. |
Definition at line 2147 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::FieldTable, clang::api_notes::APINotesReader::Implementation::getIdentifier(), and clang::api_notes::APINotesReader::Implementation::SwiftVersion.
auto clang::api_notes::APINotesReader::lookupGlobalFunction | ( | llvm::StringRef | Name, |
std::optional< Context > | Ctx = std::nullopt |
||
) |
Look for information regarding the given global function.
Name | The name of the global function. |
Definition at line 2200 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::getIdentifier(), clang::api_notes::APINotesReader::Implementation::GlobalFunctionTable, and clang::api_notes::APINotesReader::Implementation::SwiftVersion.
auto clang::api_notes::APINotesReader::lookupGlobalVariable | ( | llvm::StringRef | Name, |
std::optional< Context > | Ctx = std::nullopt |
||
) |
Look for information regarding the given global variable.
Name | The name of the global variable. |
Definition at line 2181 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::getIdentifier(), clang::api_notes::APINotesReader::Implementation::GlobalVariableTable, and clang::api_notes::APINotesReader::Implementation::SwiftVersion.
auto clang::api_notes::APINotesReader::lookupNamespaceID | ( | llvm::StringRef | Name, |
std::optional< ContextID > | ParentNamespaceID = std::nullopt |
||
) |
Look for the context ID of the given C++ namespace.
Name | The name of the class we're looking for. |
Definition at line 2290 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::ContextIDTable, clang::api_notes::APINotesReader::Implementation::getIdentifier(), and clang::api_notes::Namespace.
auto clang::api_notes::APINotesReader::lookupObjCClassID | ( | llvm::StringRef | Name | ) |
Look for the context ID of the given Objective-C class.
Name | The name of the class we're looking for. |
Definition at line 2040 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::ContextIDTable, clang::api_notes::APINotesReader::Implementation::getIdentifier(), and clang::api_notes::ObjCClass.
Referenced by lookupObjCClassInfo().
auto clang::api_notes::APINotesReader::lookupObjCClassInfo | ( | llvm::StringRef | Name | ) |
Look for information regarding the given Objective-C class.
Name | The name of the class we're looking for. |
Definition at line 2059 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::ContextInfoTable, lookupObjCClassID(), and clang::api_notes::APINotesReader::Implementation::SwiftVersion.
auto clang::api_notes::APINotesReader::lookupObjCMethod | ( | ContextID | CtxID, |
ObjCSelectorRef | Selector, | ||
bool | IsInstanceMethod | ||
) |
Look for information regarding the given Objective-C method in the given context.
CtxID | The ID that references the context we are looking for. |
Selector | The selector naming the method we're looking for. |
IsInstanceMethod | Whether we are looking for an instance method. |
Definition at line 2128 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::getSelector(), clang::api_notes::APINotesReader::Implementation::ObjCMethodTable, and clang::api_notes::APINotesReader::Implementation::SwiftVersion.
auto clang::api_notes::APINotesReader::lookupObjCProperty | ( | ContextID | CtxID, |
llvm::StringRef | Name, | ||
bool | IsInstance | ||
) |
Look for information regarding the given Objective-C property in the given context.
CtxID | The ID that references the context we are looking for. |
Name | The name of the property we're looking for. |
IsInstance | Whether we are looking for an instance property (vs. a class property). |
Definition at line 2110 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::getIdentifier(), clang::api_notes::APINotesReader::Implementation::ObjCPropertyTable, and clang::api_notes::APINotesReader::Implementation::SwiftVersion.
auto clang::api_notes::APINotesReader::lookupObjCProtocolID | ( | llvm::StringRef | Name | ) |
Look for the context ID of the given Objective-C protocol.
Name | The name of the protocol we're looking for. |
Definition at line 2075 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::ContextIDTable, clang::api_notes::APINotesReader::Implementation::getIdentifier(), and clang::api_notes::ObjCProtocol.
Referenced by lookupObjCProtocolInfo().
auto clang::api_notes::APINotesReader::lookupObjCProtocolInfo | ( | llvm::StringRef | Name | ) |
Look for information regarding the given Objective-C protocol.
Name | The name of the protocol we're looking for. |
Definition at line 2094 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::ContextInfoTable, lookupObjCProtocolID(), and clang::api_notes::APINotesReader::Implementation::SwiftVersion.
auto clang::api_notes::APINotesReader::lookupTag | ( | llvm::StringRef | Name, |
std::optional< Context > | Ctx = std::nullopt |
||
) |
Look for information regarding the given tag (struct/union/enum/C++ class).
Name | The name of the tag. |
Definition at line 2253 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::getIdentifier(), clang::api_notes::APINotesReader::Implementation::SwiftVersion, and clang::api_notes::APINotesReader::Implementation::TagTable.
auto clang::api_notes::APINotesReader::lookupTagID | ( | llvm::StringRef | Name, |
std::optional< Context > | ParentCtx = std::nullopt |
||
) |
Look for the context ID of the given C++ tag.
Name | The name of the tag we're looking for. |
ParentCtx | The context in which this tag is declared, e.g. a C++ namespace. |
Definition at line 2235 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::ContextIDTable, clang::api_notes::APINotesReader::Implementation::getIdentifier(), and clang::api_notes::Tag.
auto clang::api_notes::APINotesReader::lookupTypedef | ( | llvm::StringRef | Name, |
std::optional< Context > | Ctx = std::nullopt |
||
) |
Look for information regarding the given typedef.
Name | The name of the typedef. |
Definition at line 2271 of file APINotesReader.cpp.
References clang::api_notes::APINotesReader::Implementation::getIdentifier(), clang::api_notes::APINotesReader::Implementation::SwiftVersion, and clang::api_notes::APINotesReader::Implementation::TypedefTable.
|
delete |