LLVM 17.0.0git
|
Defines the interface file. More...
#include "llvm/TextAPI/InterfaceFile.h"
Classes | |
struct | const_symbol_iterator |
Public Types | |
using | const_target_iterator = TargetList::const_iterator |
using | const_target_range = llvm::iterator_range< const_target_iterator > |
using | const_filtered_target_iterator = llvm::filter_iterator< const_target_iterator, std::function< bool(const Target &)> > |
using | const_filtered_target_range = llvm::iterator_range< const_filtered_target_iterator > |
using | SymbolMapType = DenseMap< SymbolsMapKey, Symbol * > |
using | const_symbol_range = iterator_range< const_symbol_iterator > |
using | const_filtered_symbol_iterator = filter_iterator< const_symbol_iterator, std::function< bool(const Symbol *)> > |
using | const_filtered_symbol_range = iterator_range< const_filtered_symbol_iterator > |
Public Member Functions | |
void | setPath (StringRef Path_) |
Set the path from which this file was generated (if applicable). | |
StringRef | getPath () const |
Get the path from which this file was generated (if applicable). | |
void | setFileType (FileType Kind) |
Set the file type. | |
FileType | getFileType () const |
Get the file type. | |
ArchitectureSet | getArchitectures () const |
Get the architectures. | |
PlatformSet | getPlatforms () const |
Get the platforms. | |
void | addTarget (const Target &Target) |
Set and add target. | |
template<typename RangeT > | |
void | addTargets (RangeT &&Targets) |
Set and add targets. | |
const_target_range | targets () const |
const_filtered_target_range | targets (ArchitectureSet Archs) const |
void | setInstallName (StringRef InstallName_) |
Set the install name of the library. | |
StringRef | getInstallName () const |
Get the install name of the library. | |
void | setCurrentVersion (PackedVersion Version) |
Set the current version of the library. | |
PackedVersion | getCurrentVersion () const |
Get the current version of the library. | |
void | setCompatibilityVersion (PackedVersion Version) |
Set the compatibility version of the library. | |
PackedVersion | getCompatibilityVersion () const |
Get the compatibility version of the library. | |
void | setSwiftABIVersion (uint8_t Version) |
Set the Swift ABI version of the library. | |
uint8_t | getSwiftABIVersion () const |
Get the Swift ABI version of the library. | |
void | setTwoLevelNamespace (bool V=true) |
Specify if the library uses two-level namespace (or flat namespace). | |
bool | isTwoLevelNamespace () const |
Check if the library uses two-level namespace. | |
void | setApplicationExtensionSafe (bool V=true) |
Specify if the library is application extension safe (or not). | |
bool | isApplicationExtensionSafe () const |
Check if the library is application extension safe. | |
void | setObjCConstraint (ObjCConstraintType Constraint) |
Set the Objective-C constraint. | |
ObjCConstraintType | getObjCConstraint () const |
Get the Objective-C constraint. | |
void | setInstallAPI (bool V=true) |
Specify if this file was generated during InstallAPI (or not). | |
bool | isInstallAPI () const |
Check if this file was generated during InstallAPI. | |
void | addParentUmbrella (const Target &Target_, StringRef Parent) |
Set the parent umbrella frameworks. | |
const std::vector< std::pair< Target, std::string > > & | umbrellas () const |
Get the list of Parent Umbrella frameworks. | |
void | addAllowableClient (StringRef InstallName, const Target &Target) |
Add an allowable client. | |
const std::vector< InterfaceFileRef > & | allowableClients () const |
Get the list of allowable clients. | |
void | addReexportedLibrary (StringRef InstallName, const Target &Target) |
Add a re-exported library. | |
const std::vector< InterfaceFileRef > & | reexportedLibraries () const |
Get the list of re-exported libraries. | |
void | addUUID (const Target &Target, StringRef UUID) |
Add an Target/UUID pair. | |
void | addUUID (const Target &Target, uint8_t UUID[16]) |
Add an Target/UUID pair. | |
const std::vector< std::pair< Target, std::string > > & | uuids () const |
Get the list of Target/UUID pairs. | |
void | addDocument (std::shared_ptr< InterfaceFile > &&Document) |
Add a library for inlining to top level library. | |
InterfaceFile * | getParent () const |
Returns the pointer to parent document if exists or nullptr otherwise. | |
const std::vector< std::shared_ptr< InterfaceFile > > & | documents () const |
Get the list of inlined libraries. | |
void | addSymbol (SymbolKind Kind, StringRef Name, const TargetList &Targets, SymbolFlags Flags=SymbolFlags::None) |
Add a symbol to the symbols list or extend an existing one. | |
const_symbol_range | symbols () const |
size_t | symbolsCount () const |
const_filtered_symbol_range | exports () const |
const_filtered_symbol_range | undefineds () const |
bool | operator== (const InterfaceFile &O) const |
The equality is determined by attributes that impact linking compatibilities. | |
bool | operator!= (const InterfaceFile &O) const |
Defines the interface file.
Definition at line 152 of file InterfaceFile.h.
using llvm::MachO::InterfaceFile::const_filtered_symbol_iterator = filter_iterator<const_symbol_iterator, std::function<bool(const Symbol *)> > |
Definition at line 370 of file InterfaceFile.h.
using llvm::MachO::InterfaceFile::const_filtered_symbol_range = iterator_range<const_filtered_symbol_iterator> |
Definition at line 373 of file InterfaceFile.h.
using llvm::MachO::InterfaceFile::const_filtered_target_iterator = llvm::filter_iterator<const_target_iterator, std::function<bool(const Target &)> > |
Definition at line 208 of file InterfaceFile.h.
using llvm::MachO::InterfaceFile::const_filtered_target_range = llvm::iterator_range<const_filtered_target_iterator> |
Definition at line 211 of file InterfaceFile.h.
Definition at line 368 of file InterfaceFile.h.
Definition at line 204 of file InterfaceFile.h.
Definition at line 205 of file InterfaceFile.h.
Definition at line 352 of file InterfaceFile.h.
Add an allowable client.
Mach-O Dynamic libraries have the concept of allowable clients that are checked during static link time. The name of the application or library that is being generated needs to match one of the allowable clients or the linker refuses to link this library.
InstallName | The name of the client that is allowed to link this library. |
Target | The target triple for which this applies. |
Definition at line 49 of file InterfaceFile.cpp.
void InterfaceFile::addDocument | ( | std::shared_ptr< InterfaceFile > && | Document | ) |
Add a library for inlining to top level library.
Document | The library to inline with top level library. |
Definition at line 121 of file InterfaceFile.cpp.
References LHS, llvm::lower_bound(), and RHS.
Set the parent umbrella frameworks.
Target_ | The target applicable to Parent |
Parent | The name of Parent |
Definition at line 61 of file InterfaceFile.cpp.
References LHS, llvm::lower_bound(), and RHS.
Add a re-exported library.
InstallName | The name of the library to re-export. |
Target | The target triple for which this applies. |
Definition at line 55 of file InterfaceFile.cpp.
References llvm::Lib.
void InterfaceFile::addSymbol | ( | SymbolKind | Kind, |
StringRef | Name, | ||
const TargetList & | Targets, | ||
SymbolFlags | Flags = SymbolFlags::None |
||
) |
Add a symbol to the symbols list or extend an existing one.
Definition at line 110 of file InterfaceFile.cpp.
References Name, and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::try_emplace().
Set and add target.
Target | the target to add into. |
Definition at line 98 of file InterfaceFile.cpp.
Referenced by addTargets().
|
inline |
Set and add targets.
Add the subset of llvm::triples that is supported by Tapi
Targets | the collection of targets. |
Definition at line 199 of file InterfaceFile.h.
References addTarget().
Add an Target/UUID pair.
Target | The target triple for which this applies. |
UUID | The UUID of the library for the specified architecture. |
Definition at line 74 of file InterfaceFile.cpp.
References LHS, llvm::lower_bound(), and RHS.
Referenced by addUUID().
Add an Target/UUID pair.
Target | The target triple for which this applies. |
UUID | The UUID of the library for the specified architecture. |
Definition at line 87 of file InterfaceFile.cpp.
References addUUID().
|
inline |
Get the list of allowable clients.
Definition at line 297 of file InterfaceFile.h.
|
inline |
Get the list of inlined libraries.
Definition at line 344 of file InterfaceFile.h.
|
inline |
|
inline |
Get the architectures.
Definition at line 180 of file InterfaceFile.h.
References llvm::MachO::mapToArchitectureSet().
|
inline |
Get the compatibility version of the library.
Definition at line 235 of file InterfaceFile.h.
|
inline |
Get the current version of the library.
Definition at line 227 of file InterfaceFile.h.
|
inline |
|
inline |
Get the install name of the library.
Definition at line 221 of file InterfaceFile.h.
|
inline |
Get the Objective-C constraint.
Definition at line 261 of file InterfaceFile.h.
|
inline |
Returns the pointer to parent document if exists or nullptr otherwise.
Definition at line 339 of file InterfaceFile.h.
|
inline |
Get the path from which this file was generated (if applicable).
Definition at line 162 of file InterfaceFile.h.
|
inline |
Get the platforms.
Definition at line 187 of file InterfaceFile.h.
References llvm::MachO::mapToPlatformSet().
Referenced by llvm::object::TapiFile::TapiFile().
|
inline |
Get the Swift ABI version of the library.
Definition at line 241 of file InterfaceFile.h.
|
inline |
Check if the library is application extension safe.
Definition at line 253 of file InterfaceFile.h.
|
inline |
Check if this file was generated during InstallAPI.
Definition at line 267 of file InterfaceFile.h.
|
inline |
Check if the library uses two-level namespace.
Definition at line 247 of file InterfaceFile.h.
|
inline |
Definition at line 406 of file InterfaceFile.h.
bool InterfaceFile::operator== | ( | const InterfaceFile & | O | ) | const |
The equality is determined by attributes that impact linking compatibilities.
UUIDs, Path, & FileKind are irrelevant since these by itself should not impact linking. This is an expensive operation.
Definition at line 131 of file InterfaceFile.cpp.
|
inline |
Get the list of re-exported libraries.
Definition at line 310 of file InterfaceFile.h.
Specify if the library is application extension safe (or not).
Definition at line 250 of file InterfaceFile.h.
|
inline |
Set the compatibility version of the library.
Definition at line 230 of file InterfaceFile.h.
|
inline |
Set the current version of the library.
Definition at line 224 of file InterfaceFile.h.
|
inline |
Set the file type.
This is used by the YAML writer to identify the specification it should use for writing the file.
Kind | The file type. |
Definition at line 170 of file InterfaceFile.h.
Specify if this file was generated during InstallAPI (or not).
Definition at line 264 of file InterfaceFile.h.
|
inline |
Set the install name of the library.
Definition at line 216 of file InterfaceFile.h.
|
inline |
Set the Objective-C constraint.
Definition at line 256 of file InterfaceFile.h.
|
inline |
Set the path from which this file was generated (if applicable).
Path_ | The path to the source file. |
Definition at line 157 of file InterfaceFile.h.
|
inline |
Set the Swift ABI version of the library.
Definition at line 238 of file InterfaceFile.h.
Specify if the library uses two-level namespace (or flat namespace).
Definition at line 244 of file InterfaceFile.h.
|
inline |
Definition at line 376 of file InterfaceFile.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::begin(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end().
Referenced by llvm::object::TapiFile::TapiFile().
|
inline |
Definition at line 380 of file InterfaceFile.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size().
|
inline |
Definition at line 206 of file InterfaceFile.h.
InterfaceFile::const_filtered_target_range InterfaceFile::targets | ( | ArchitectureSet | Archs | ) | const |
Definition at line 103 of file InterfaceFile.cpp.
References llvm::MachO::ArchitectureSet::has(), and llvm::make_filter_range().
|
inline |
Get the list of Parent Umbrella frameworks.
Definition at line 278 of file InterfaceFile.h.
|
inline |
|
inline |
Get the list of Target/UUID pairs.
Definition at line 329 of file InterfaceFile.h.