|
clang 22.0.0git
|
The DirectoryScanner for collecting library files on the file system. More...
Classes | |
| class | DirectoryScanner |
| class | DylibVerifier |
| Service responsible to tracking state of verification across the lifetime of InstallAPI. More... | |
| class | FileListReader |
| struct | FrontendAttrs |
| Frontend information captured about records. More... | |
| class | FrontendRecordsSlice |
| class | HeaderFile |
| class | HeaderGlob |
| Glob that represents a pattern of header files to retreive. More... | |
| class | InstallAPIAction |
| struct | InstallAPIContext |
| Struct used for generating validating InstallAPI. More... | |
| class | InstallAPIVisitor |
| ASTVisitor for collecting declarations that represent global symbols. More... | |
| class | LibAttrs |
| Represents dynamic library specific attributes that are tied to architecture slices. More... | |
| class | Library |
| struct | ZipperedDeclSource |
Typedefs | |
| using | ReexportedInterfaces = llvm::SmallVector<llvm::MachO::InterfaceFile, 8> |
| using | ZipperedDeclSources = std::vector<ZipperedDeclSource> |
| using | HeaderSeq = std::vector<HeaderFile> |
Enumerations | |
| enum | ScanMode { ScanFrameworks , ScanDylibs } |
| enum class | VerificationMode { Invalid , ErrorsOnly , ErrorsAndWarnings , Pedantic } |
| A list of InstallAPI verification modes. More... | |
| enum class | HeaderType { Public , Private , Project , Unknown } |
Functions | |
| std::string | findLibrary (StringRef InstallName, FileManager &FM, ArrayRef< std::string > FrameworkSearchPaths, ArrayRef< std::string > LibrarySearchPaths, ArrayRef< std::string > SearchPaths) |
| Lookup the dylib or TextAPI file location for a system library or framework. | |
| std::unique_ptr< llvm::MemoryBuffer > | createInputBuffer (InstallAPIContext &Ctx) |
| Create a buffer that contains all headers to scan for global symbols with. | |
| StringRef | getName (const HeaderType T) |
| std::optional< std::string > | createIncludeHeaderName (const StringRef FullPath) |
| Assemble expected way header will be included by clients. | |
| bool | isHeaderFile (StringRef Path) |
| Determine if Path is a header file. | |
| llvm::Expected< PathSeq > | enumerateFiles (clang::FileManager &FM, StringRef Directory) |
| Given input directory, collect all header files. | |
| static bool | isFramework (StringRef Path) |
| static bool | isCppMangled (StringRef Name) |
| static std::string | demangle (StringRef Name) |
| static DylibVerifier::Result | updateResult (const DylibVerifier::Result Prev, const DylibVerifier::Result Curr) |
| static bool | shouldIgnorePrivateExternAttr (const Decl *D) |
| Record * | findRecordFromSlice (const RecordsSlice *Slice, StringRef Name, EncodeKind Kind) |
| static ObjCIFSymbolKind | assignObjCIFSymbolKind (const ObjCInterfaceRecord *R) |
| static bool | shouldIgnoreCpp (StringRef Name, bool IsWeakDef) |
| static StringRef | getFileExtension (clang::Language Lang) |
| const Regex | Rule ("(.+)/(.+)\\.framework/") |
| static bool | isExported (const NamedDecl *D) |
| static bool | isInlined (const FunctionDecl *D) |
| static SymbolFlags | getFlags (bool WeakDef, bool ThreadLocal=false) |
| static bool | hasObjCExceptionAttribute (const ObjCInterfaceDecl *D) |
| Check if the interface itself or any of its super classes have an exception attribute. | |
| static bool | hasVTable (const CXXRecordDecl *D) |
| static CXXLinkage | getVTableLinkage (const CXXRecordDecl *D) |
| static bool | isRTTIWeakDef (const CXXRecordDecl *D) |
| static bool | hasRTTI (const CXXRecordDecl *D) |
The DirectoryScanner for collecting library files on the file system.
Defines the content of a library, such as public and private header files, and whether it is a framework.
Representations of a library's headers for InstallAPI.
| using clang::installapi::HeaderSeq = std::vector<HeaderFile> |
Definition at line 150 of file HeaderFile.h.
| using clang::installapi::ReexportedInterfaces = llvm::SmallVector<llvm::MachO::InterfaceFile, 8> |
Definition at line 28 of file DylibVerifier.h.
| using clang::installapi::ZipperedDeclSources = std::vector<ZipperedDeclSource> |
Definition at line 61 of file DylibVerifier.h.
|
strong |
Definition at line 26 of file HeaderFile.h.
| Enumerator | |
|---|---|
| ScanFrameworks | Scanning Framework directory. |
| ScanDylibs | Scanning Dylib directory. |
Definition at line 20 of file DirectoryScanner.h.
|
strong |
A list of InstallAPI verification modes.
| Enumerator | |
|---|---|
| Invalid | |
| ErrorsOnly | |
| ErrorsAndWarnings | |
| Pedantic | |
Definition at line 21 of file DylibVerifier.h.
|
static |
Definition at line 558 of file DylibVerifier.cpp.
References clang::Result.
Referenced by clang::installapi::DylibVerifier::verify().
| std::optional< std::string > clang::installapi::createIncludeHeaderName | ( | const StringRef | FullPath | ) |
Assemble expected way header will be included by clients.
As in what maps inside the brackets of #include <IncludeName.h> For example, "/System/Library/Frameworks/Foo.framework/Headers/Foo.h" returns "Foo/Foo.h"
| FullPath | Path to the header file which includes the library structure. |
Definition at line 19 of file HeaderFile.cpp.
References clang::installapi::HeaderFile::getFrameworkIncludeRule().
| std::unique_ptr< MemoryBuffer > clang::installapi::createInputBuffer | ( | InstallAPIContext & | Ctx | ) |
Create a buffer that contains all headers to scan for global symbols with.
Definition at line 135 of file Frontend.cpp.
References clang::installapi::InstallAPIContext::addKnownHeader(), clang::C, clang::CXX, getFileExtension(), clang::installapi::HeaderFile::getIncludeName(), getName(), clang::installapi::HeaderFile::getPath(), clang::installapi::HeaderFile::getType(), clang::installapi::InstallAPIContext::InputHeaders, clang::installapi::HeaderFile::isExcluded(), clang::installapi::InstallAPIContext::LangMode, clang::installapi::InstallAPIContext::Slice, clang::installapi::InstallAPIContext::Type, Unknown, and clang::installapi::HeaderFile::useIncludeName().
|
static |
Definition at line 73 of file DylibVerifier.cpp.
References isCppMangled(), and clang::Result.
| llvm::Expected< PathSeq > clang::installapi::enumerateFiles | ( | clang::FileManager & | FM, |
| StringRef | Directory ) |
Given input directory, collect all header files.
| FM | FileManager for finding input files. |
| Directory | Path to directory file. |
Definition at line 45 of file HeaderFile.cpp.
References clang::FileManager::getVirtualFileSystem(), and isHeaderFile().
| std::string clang::installapi::findLibrary | ( | StringRef | InstallName, |
| FileManager & | FM, | ||
| ArrayRef< std::string > | FrameworkSearchPaths, | ||
| ArrayRef< std::string > | LibrarySearchPaths, | ||
| ArrayRef< std::string > | SearchPaths ) |
Lookup the dylib or TextAPI file location for a system library or framework.
The search paths provided are searched in order. @rpath based libraries are not supported.
| InstallName | The install name for the library. |
| FrameworkSearchPaths | Search paths to look up frameworks with. |
| LibrarySearchPaths | Search paths to look up dylibs with. |
| SearchPaths | Fallback search paths if library was not found in earlier paths. |
Definition at line 165 of file Frontend.cpp.
References clang::FileManager::getOptionalFileRef().
| Record * clang::installapi::findRecordFromSlice | ( | const RecordsSlice * | Slice, |
| StringRef | Name, | ||
| EncodeKind | Kind ) |
Definition at line 170 of file DylibVerifier.cpp.
|
static |
Definition at line 120 of file Frontend.cpp.
References clang::C, clang::CXX, clang::ObjC, and clang::ObjCXX.
Referenced by createInputBuffer().
|
static |
Definition at line 67 of file Visitor.cpp.
References clang::Result.
Referenced by clang::installapi::InstallAPIVisitor::VisitCXXRecordDecl(), clang::installapi::InstallAPIVisitor::VisitFunctionDecl(), and clang::installapi::InstallAPIVisitor::VisitVarDecl().
|
inline |
Definition at line 38 of file HeaderFile.h.
References Private, Project, Public, clang::T, and Unknown.
Referenced by createInputBuffer().
|
static |
Definition at line 347 of file Visitor.cpp.
References clang::Decl::getASTContext(), clang::ASTContext::getCurrentKeyFunction(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::NamedDecl::getVisibility(), clang::CXXRecordDecl::hasDefinition(), clang::HiddenVisibility, clang::CXXRecordDecl::isDynamicClass(), clang::NamedDecl::isExternallyVisible(), isInlined(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by isRTTIWeakDef().
|
static |
Check if the interface itself or any of its super classes have an exception attribute.
InstallAPI needs to export an additional symbol ("OBJC_EHTYPE_$CLASS_NAME") if any of the classes have the exception attribute.
Definition at line 132 of file Visitor.cpp.
References clang::ObjCInterfaceDecl::getSuperClass(), and clang::Decl::hasAttr().
Referenced by clang::installapi::InstallAPIVisitor::VisitObjCInterfaceDecl().
|
static |
Definition at line 400 of file Visitor.cpp.
References clang::Decl::getASTContext(), clang::ASTContext::getLangOpts(), clang::CXXRecordDecl::hasDefinition(), clang::CXXRecordDecl::isDynamicClass(), and isRTTIWeakDef().
|
static |
Definition at line 303 of file Visitor.cpp.
References clang::Decl::getASTContext(), clang::ASTContext::getCurrentKeyFunction(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::CXXRecordDecl::hasDefinition(), clang::CXXRecordDecl::isAbstract(), clang::TagDecl::isCompleteDefinition(), clang::CXXRecordDecl::isDynamicClass(), clang::NamedDecl::isExternallyVisible(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
|
static |
Definition at line 67 of file DylibVerifier.cpp.
Referenced by demangle().
Definition at line 36 of file Visitor.cpp.
References clang::DefaultVisibility, clang::NamedDecl::getLinkageAndVisibility(), and clang::isExternallyVisible().
Referenced by clang::installapi::InstallAPIVisitor::VisitCXXRecordDecl(), clang::installapi::InstallAPIVisitor::VisitFunctionDecl(), clang::installapi::InstallAPIVisitor::VisitObjCInterfaceDecl(), and clang::installapi::InstallAPIVisitor::VisitVarDecl().
|
static |
Definition at line 65 of file DirectoryScanner.cpp.
| bool clang::installapi::isHeaderFile | ( | StringRef | Path | ) |
Determine if Path is a header file.
It does not touch the file system.
| Path | File path to file. |
Definition at line 39 of file HeaderFile.cpp.
References clang::Default.
Referenced by enumerateFiles().
|
static |
Definition at line 42 of file Visitor.cpp.
References clang::CPlusPlus, clang::Decl::getASTContext(), clang::TargetInfo::getCXXABI(), clang::ASTContext::getTargetInfo(), clang::Decl::hasAttr(), clang::TargetCXXABI::isMicrosoft(), and clang::FunctionDecl::redecls().
Referenced by getVTableLinkage(), clang::installapi::InstallAPIVisitor::VisitCXXRecordDecl(), and clang::installapi::InstallAPIVisitor::VisitFunctionDecl().
|
static |
Definition at line 387 of file Visitor.cpp.
References clang::Decl::getASTContext(), clang::ASTContext::getCurrentKeyFunction(), getVTableLinkage(), clang::Decl::hasAttr(), clang::CXXRecordDecl::isAbstract(), and clang::CXXRecordDecl::isDynamicClass().
Referenced by hasRTTI().
| const Regex clang::installapi::Rule | ( | "(.+)/(.+)\\.framework/" | ) |
Definition at line 620 of file DylibVerifier.cpp.
Definition at line 161 of file DylibVerifier.cpp.
References clang::cast(), and clang::SC_PrivateExtern.
|
static |
Definition at line 142 of file DylibVerifier.cpp.
References clang::installapi::DylibVerifier::Ignore, clang::installapi::DylibVerifier::Invalid, clang::installapi::DylibVerifier::NoVerify, and clang::installapi::DylibVerifier::Valid.