clang 20.0.0git
|
Service responsible to tracking state of verification across the lifetime of InstallAPI. More...
#include "clang/InstallAPI/DylibVerifier.h"
Classes | |
struct | DWARFContext |
struct | SymbolContext |
Metadata stored about a mapping of a declaration to a symbol. More... | |
struct | VerifierContext |
Public Types | |
enum class | Result { NoVerify , Ignore , Valid , Invalid } |
Public Member Functions | |
DylibVerifier ()=default | |
DylibVerifier (llvm::MachO::Records &&Dylib, ReexportedInterfaces &&Reexports, AliasMap Aliases, DiagnosticsEngine *Diag, VerificationMode Mode, bool Zippered, bool Demangle, StringRef DSYMPath) | |
Result | verify (GlobalRecord *R, const FrontendAttrs *FA) |
Result | verify (ObjCInterfaceRecord *R, const FrontendAttrs *FA) |
Result | verify (ObjCIVarRecord *R, const FrontendAttrs *FA, const StringRef SuperClass) |
Result | verifyRemainingSymbols () |
bool | verifyBinaryAttrs (const ArrayRef< Target > ProvidedTargets, const BinaryAttrs &ProvidedBA, const LibAttrs &ProvidedReexports, const LibAttrs &ProvidedClients, const LibAttrs &ProvidedRPaths, const FileType &FT) |
Compare and report the attributes represented as load commands in the dylib to the attributes provided via options. | |
void | setTarget (const Target &T) |
Initialize target for verification. | |
std::unique_ptr< SymbolSet > | takeExports () |
Release ownership over exports. | |
Result | getState () const |
Get result of verification. | |
void | setSourceManager (IntrusiveRefCntPtr< SourceManager > SourceMgr) |
Set different source managers to the same diagnostics engine. | |
Service responsible to tracking state of verification across the lifetime of InstallAPI.
As declarations are collected during AST traversal, they are compared as symbols against what is available in the binary dylib.
Definition at line 45 of file DylibVerifier.h.
|
strong |
Enumerator | |
---|---|
NoVerify | |
Ignore | |
Valid | |
Invalid |
Definition at line 51 of file DylibVerifier.h.
|
default |
|
inline |
Definition at line 80 of file DylibVerifier.h.
|
inline |
Get result of verification.
Definition at line 112 of file DylibVerifier.h.
References clang::installapi::DylibVerifier::VerifierContext::FrontendState.
Referenced by verify(), and verifyRemainingSymbols().
void clang::installapi::DylibVerifier::setSourceManager | ( | IntrusiveRefCntPtr< SourceManager > | SourceMgr | ) |
Set different source managers to the same diagnostics engine.
Definition at line 519 of file DylibVerifier.cpp.
References clang::installapi::DylibVerifier::VerifierContext::Diag, and clang::DiagnosticsEngine::setSourceManager().
void clang::installapi::DylibVerifier::setTarget | ( | const Target & | T | ) |
Initialize target for verification.
Definition at line 508 of file DylibVerifier.cpp.
References clang::installapi::DylibVerifier::VerifierContext::DiscoveredFirstError, Ignore, NoVerify, clang::T, and clang::installapi::DylibVerifier::VerifierContext::Target.
std::unique_ptr< SymbolSet > clang::installapi::DylibVerifier::takeExports | ( | ) |
Release ownership over exports.
Definition at line 985 of file DylibVerifier.cpp.
References clang::installapi::DylibVerifier::SymbolContext::Kind, and clang::installapi::DylibVerifier::SymbolContext::SymbolName.
DylibVerifier::Result clang::installapi::DylibVerifier::verify | ( | GlobalRecord * | R, |
const FrontendAttrs * | FA | ||
) |
Definition at line 567 of file DylibVerifier.cpp.
References clang::installapi::DylibVerifier::SymbolContext::FA, getState(), clang::installapi::DylibVerifier::SymbolContext::Inlined, clang::installapi::DylibVerifier::SymbolContext::Kind, and clang::installapi::DylibVerifier::SymbolContext::SymbolName.
DylibVerifier::Result clang::installapi::DylibVerifier::verify | ( | ObjCInterfaceRecord * | R, |
const FrontendAttrs * | FA | ||
) |
Definition at line 552 of file DylibVerifier.cpp.
References clang::installapi::assignObjCIFSymbolKind(), clang::installapi::DylibVerifier::SymbolContext::FA, getState(), clang::installapi::DylibVerifier::SymbolContext::Kind, clang::installapi::DylibVerifier::SymbolContext::ObjCIFKind, and clang::installapi::DylibVerifier::SymbolContext::SymbolName.
DylibVerifier::Result clang::installapi::DylibVerifier::verify | ( | ObjCIVarRecord * | R, |
const FrontendAttrs * | FA, | ||
const StringRef | SuperClass | ||
) |
Definition at line 527 of file DylibVerifier.cpp.
References FullName, and getState().
bool clang::installapi::DylibVerifier::verifyBinaryAttrs | ( | const ArrayRef< Target > | ProvidedTargets, |
const BinaryAttrs & | ProvidedBA, | ||
const LibAttrs & | ProvidedReexports, | ||
const LibAttrs & | ProvidedClients, | ||
const LibAttrs & | ProvidedRPaths, | ||
const FileType & | FT | ||
) |
Compare and report the attributes represented as load commands in the dylib to the attributes provided via options.
Definition at line 811 of file DylibVerifier.cpp.
References clang::installapi::DylibVerifier::VerifierContext::Diag, and clang::DiagnosticsEngine::Report().
DylibVerifier::Result clang::installapi::DylibVerifier::verifyRemainingSymbols | ( | ) |
Definition at line 791 of file DylibVerifier.cpp.
References clang::installapi::DylibVerifier::VerifierContext::DiscoveredFirstError, clang::installapi::DylibVerifier::VerifierContext::DylibSlice, getState(), NoVerify, clang::installapi::DylibVerifier::VerifierContext::PrintArch, clang::Target, and clang::installapi::DylibVerifier::VerifierContext::Target.