clang 20.0.0git
Classes | Public Types | Public Member Functions | List of all members
clang::installapi::DylibVerifier Class Reference

Service responsible to tracking state of verification across the lifetime of InstallAPI. More...

#include "clang/InstallAPI/DylibVerifier.h"

Inheritance diagram for clang::installapi::DylibVerifier:
Inheritance graph
[legend]

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< SymbolSettakeExports ()
 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.
 

Detailed Description

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.

Member Enumeration Documentation

◆ Result

Enumerator
NoVerify 
Ignore 
Valid 
Invalid 

Definition at line 51 of file DylibVerifier.h.

Constructor & Destructor Documentation

◆ DylibVerifier() [1/2]

clang::installapi::DylibVerifier::DylibVerifier ( )
default

◆ DylibVerifier() [2/2]

clang::installapi::DylibVerifier::DylibVerifier ( llvm::MachO::Records &&  Dylib,
ReexportedInterfaces &&  Reexports,
AliasMap  Aliases,
DiagnosticsEngine Diag,
VerificationMode  Mode,
bool  Zippered,
bool  Demangle,
StringRef  DSYMPath 
)
inline

Definition at line 80 of file DylibVerifier.h.

Member Function Documentation

◆ getState()

Result clang::installapi::DylibVerifier::getState ( ) const
inline

Get result of verification.

Definition at line 112 of file DylibVerifier.h.

References clang::installapi::DylibVerifier::VerifierContext::FrontendState.

Referenced by verify(), and verifyRemainingSymbols().

◆ setSourceManager()

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().

◆ setTarget()

void clang::installapi::DylibVerifier::setTarget ( const Target T)

◆ takeExports()

std::unique_ptr< SymbolSet > clang::installapi::DylibVerifier::takeExports ( )

◆ verify() [1/3]

DylibVerifier::Result clang::installapi::DylibVerifier::verify ( GlobalRecord R,
const FrontendAttrs FA 
)

◆ verify() [2/3]

DylibVerifier::Result clang::installapi::DylibVerifier::verify ( ObjCInterfaceRecord R,
const FrontendAttrs FA 
)

◆ verify() [3/3]

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().

◆ verifyBinaryAttrs()

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().

◆ verifyRemainingSymbols()

DylibVerifier::Result clang::installapi::DylibVerifier::verifyRemainingSymbols ( )

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