LLVM  10.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
llvm::orc::StaticLibraryDefinitionGenerator Class Reference

A utility class to expose symbols from a static library. More...

#include "llvm/ExecutionEngine/Orc/ExecutionUtils.h"

Inheritance diagram for llvm::orc::StaticLibraryDefinitionGenerator:
Inheritance graph
[legend]
Collaboration diagram for llvm::orc::StaticLibraryDefinitionGenerator:
Collaboration graph
[legend]

Public Member Functions

Expected< SymbolNameSettryToGenerate (JITDylib &JD, const SymbolNameSet &Names) override
 
- Public Member Functions inherited from llvm::orc::JITDylib::DefinitionGenerator
virtual ~DefinitionGenerator ()
 

Static Public Member Functions

static Expected< std::unique_ptr< StaticLibraryDefinitionGenerator > > Load (ObjectLayer &L, const char *FileName)
 Try to create a StaticLibraryDefinitionGenerator from the given path. More...
 
static Expected< std::unique_ptr< StaticLibraryDefinitionGenerator > > Create (ObjectLayer &L, std::unique_ptr< MemoryBuffer > ArchiveBuffer)
 Try to create a StaticLibrarySearchGenerator from the given memory buffer. More...
 

Detailed Description

A utility class to expose symbols from a static library.

If an instance of this class is attached to a JITDylib as a fallback definition generator, then any symbol found in the archive will result in the containing object being added to the JITDylib.

Definition at line 285 of file ExecutionUtils.h.

Member Function Documentation

◆ Create()

Expected< std::unique_ptr< StaticLibraryDefinitionGenerator > > llvm::orc::StaticLibraryDefinitionGenerator::Create ( ObjectLayer L,
std::unique_ptr< MemoryBuffer ArchiveBuffer 
)
static

Try to create a StaticLibrarySearchGenerator from the given memory buffer.

Thhis call will succeed if the buffer contains a valid archive, otherwise it will return an error.

Definition at line 241 of file ExecutionUtils.cpp.

◆ Load()

Expected< std::unique_ptr< StaticLibraryDefinitionGenerator > > llvm::orc::StaticLibraryDefinitionGenerator::Load ( ObjectLayer L,
const char FileName 
)
static

Try to create a StaticLibraryDefinitionGenerator from the given path.

This call will succeed if the file at the given path is a static library is a valid archive, otherwise it will return an error.

Definition at line 231 of file ExecutionUtils.cpp.

References llvm::errorOrToExpected(), and llvm::MemoryBuffer::getFile().

◆ tryToGenerate()

Expected< SymbolNameSet > llvm::orc::StaticLibraryDefinitionGenerator::tryToGenerate ( JITDylib JD,
const SymbolNameSet Names 
)
overridevirtual

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