class InterfaceFile

Declaration

class InterfaceFile { /* full declaration omitted */ };

Description

Defines the interface file.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:152

Member Variables

private llvm::BumpPtrAllocator Allocator
private llvm::MachO::TargetList Targets
private std::string Path
private llvm::MachO::FileType FileKind
private std::string InstallName
private llvm::MachO::PackedVersion CurrentVersion
private llvm::MachO::PackedVersion CompatibilityVersion
private uint8_t SwiftABIVersion = {0}
private bool IsTwoLevelNamespace = {false}
private bool IsAppExtensionSafe = {false}
private bool IsInstallAPI = {false}
private llvm::MachO::ObjCConstraintType ObjcConstraint = ObjCConstraintType::None
private std::vector<std::pair<Target, std::string>> ParentUmbrellas
private std::vector<InterfaceFileRef> AllowableClients
private std::vector<InterfaceFileRef> ReexportedLibraries
private std::vector<std::shared_ptr<InterfaceFile>> Documents
private std::vector<std::pair<Target, std::string>> UUIDs
private llvm::MachO::InterfaceFile::SymbolMapType Symbols
private llvm::MachO::InterfaceFile* Parent = nullptr

Method Overview

Methods

void addAllowableClient(
    llvm::StringRef InstallName,
    const llvm::MachO::Target& Target)

Description

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.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:292

Parameters

llvm::StringRef InstallName
The name of the client that is allowed to link this library.
const llvm::MachO::Target& Target
The target triple for which this applies.

void addDocument(
    std::shared_ptr<InterfaceFile>&& Document)

Description

Add a library for inlining to top level library.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:336

Parameters

std::shared_ptr<InterfaceFile>&& Document
The library to inline with top level library.

void addParentUmbrella(
    const llvm::MachO::Target& Target_,
    llvm::StringRef Parent)

Description

Set the parent umbrella frameworks.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:272

Parameters

const llvm::MachO::Target& Target_
The target applicable to Parent
llvm::StringRef Parent
The name of Parent

void addReexportedLibrary(
    llvm::StringRef InstallName,
    const llvm::MachO::Target& Target)

Description

Add a re-exported library.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:305

Parameters

llvm::StringRef InstallName
The name of the library to re-export.
const llvm::MachO::Target& Target
The target triple for which this applies.

void addSymbol(
    llvm::MachO::SymbolKind Kind,
    llvm::StringRef Name,
    const llvm::MachO::TargetList& Targets,
    llvm::MachO::SymbolFlags Flags =
        SymbolFlags::None)

Description

Add a symbol to the symbols list or extend an existing one.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:349

Parameters

llvm::MachO::SymbolKind Kind
llvm::StringRef Name
const llvm::MachO::TargetList& Targets
llvm::MachO::SymbolFlags Flags = SymbolFlags::None

void addTarget(const llvm::MachO::Target& Target)

Description

Set and add target.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:192

Parameters

const llvm::MachO::Target& Target
the target to add into.

template <typename RangeT>
void addTargets(RangeT&& Targets)

Description

Set and add targets. Add the subset of llvm::triples that is supported by Tapi

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:199

Templates

RangeT

Parameters

RangeT&& Targets
the collection of targets.

void addUUID(const llvm::MachO::Target& Target,
             uint8_t* UUID)

Description

Add an Target/UUID pair.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:324

Parameters

const llvm::MachO::Target& Target
The target triple for which this applies.
uint8_t* UUID
The UUID of the library for the specified architecture.

void addUUID(const llvm::MachO::Target& Target,
             llvm::StringRef UUID)

Description

Add an Target/UUID pair.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:318

Parameters

const llvm::MachO::Target& Target
The target triple for which this applies.
llvm::StringRef UUID
The UUID of the library for the specified architecture.

const std::vector<InterfaceFileRef>&
allowableClients() const

Description

Get the list of allowable clients.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:297

Returns

Returns a list of allowable clients.

llvm::StringRef copyString(llvm::StringRef String)

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:410

Parameters

llvm::StringRef String

const std::vector<std::shared_ptr<InterfaceFile>>&
documents() const

Description

Get the list of inlined libraries.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:344

Returns

Returns a list of the inlined frameworks.

llvm::MachO::InterfaceFile::
    const_filtered_symbol_range
    exports() const

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:382

llvm::MachO::ArchitectureSet getArchitectures()
    const

Description

Get the architectures.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:180

Returns

The applicable architectures.

llvm::MachO::PackedVersion
getCompatibilityVersion() const

Description

Get the compatibility version of the library.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:235

llvm::MachO::PackedVersion getCurrentVersion()
    const

Description

Get the current version of the library.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:227

llvm::MachO::FileType getFileType() const

Description

Get the file type.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:175

Returns

The file type.

llvm::StringRef getInstallName() const

Description

Get the install name of the library.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:221

llvm::MachO::ObjCConstraintType
getObjCConstraint() const

Description

Get the Objective-C constraint.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:261

llvm::MachO::InterfaceFile* getParent() const

Description

Returns the pointer to parent document if exists or nullptr otherwise.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:339

llvm::StringRef getPath() const

Description

Get the path from which this file was generated (if applicable).

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:162

Returns

The path to the source file or empty.

llvm::MachO::PlatformSet getPlatforms() const

Description

Get the platforms.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:187

Returns

The applicable platforms.

uint8_t getSwiftABIVersion() const

Description

Get the Swift ABI version of the library.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:241

bool isApplicationExtensionSafe() const

Description

Check if the library is application extension safe.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:253

bool isInstallAPI() const

Description

Check if this file was generated during InstallAPI.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:267

bool isTwoLevelNamespace() const

Description

Check if the library uses two-level namespace.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:247

const std::vector<InterfaceFileRef>&
reexportedLibraries() const

Description

Get the list of re-exported libraries.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:310

Returns

Returns a list of re-exported libraries.

void setApplicationExtensionSafe(bool V = true)

Description

Specify if the library is application extension safe (or not).

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:250

Parameters

bool V = true

void setCompatibilityVersion(
    llvm::MachO::PackedVersion Version)

Description

Set the compatibility version of the library.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:230

Parameters

llvm::MachO::PackedVersion Version

void setCurrentVersion(
    llvm::MachO::PackedVersion Version)

Description

Set the current version of the library.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:224

Parameters

llvm::MachO::PackedVersion Version

void setFileType(llvm::MachO::FileType Kind)

Description

Set the file type. This is used by the YAML writer to identify the specification it should use for writing the file.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:170

Parameters

llvm::MachO::FileType Kind
The file type.

void setInstallAPI(bool V = true)

Description

Specify if this file was generated during InstallAPI (or not).

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:264

Parameters

bool V = true

void setInstallName(llvm::StringRef InstallName_)

Description

Set the install name of the library.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:216

Parameters

llvm::StringRef InstallName_

void setObjCConstraint(
    llvm::MachO::ObjCConstraintType Constraint)

Description

Set the Objective-C constraint.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:256

Parameters

llvm::MachO::ObjCConstraintType Constraint

void setPath(llvm::StringRef Path_)

Description

Set the path from which this file was generated (if applicable).

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:157

Parameters

llvm::StringRef Path_
The path to the source file.

void setSwiftABIVersion(uint8_t Version)

Description

Set the Swift ABI version of the library.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:238

Parameters

uint8_t Version

void setTwoLevelNamespace(bool V = true)

Description

Specify if the library uses two-level namespace (or flat namespace).

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:244

Parameters

bool V = true

llvm::MachO::InterfaceFile::const_symbol_range
symbols() const

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:376

size_t symbolsCount() const

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:380

llvm::MachO::InterfaceFile::
    const_filtered_target_range
    targets(
        llvm::MachO::ArchitectureSet Archs) const

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:213

Parameters

llvm::MachO::ArchitectureSet Archs

llvm::MachO::InterfaceFile::const_target_range
targets() const

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:206

const std::vector<std::pair<Target, std::string>>&
umbrellas() const

Description

Get the list of Parent Umbrella frameworks.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:278

Returns

Returns a list of target information and install name of parent umbrellas.

llvm::MachO::InterfaceFile::
    const_filtered_symbol_range
    undefineds() const

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:391

const std::vector<std::pair<Target, std::string>>&
uuids() const

Description

Get the list of Target/UUID pairs.

Declared at: llvm/include/llvm/TextAPI/InterfaceFile.h:329

Returns

Returns a list of Target/UUID pairs.