|
LLVM
10.0.0
|
A utility class to expose symbols from a static library. More...
#include "llvm/ExecutionEngine/Orc/ExecutionUtils.h"
Public Member Functions | |
| Error | tryToGenerate (LookupKind K, JITDylib &JD, JITDylibLookupFlags JDLookupFlags, const SymbolLookupSet &Symbols) override |
| DefinitionGenerators should override this method to insert new definitions into the parent JITDylib. More... | |
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... | |
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 297 of file ExecutionUtils.h.
|
static |
Try to create a StaticLibrarySearchGenerator from the given memory buffer.
This call will succeed if the buffer contains a valid archive, otherwise it will return an error.
Definition at line 262 of file ExecutionUtils.cpp.
|
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 252 of file ExecutionUtils.cpp.
References llvm::errorOrToExpected(), and llvm::MemoryBuffer::getFile().
|
overridevirtual |
DefinitionGenerators should override this method to insert new definitions into the parent JITDylib.
K specifies the kind of this lookup. JD specifies the target JITDylib being searched, and JDLookupFlags specifies whether the search should match against hidden symbols. Finally, Symbols describes the set of unresolved symbols and their associated lookup flags.
Implements llvm::orc::JITDylib::DefinitionGenerator.
Definition at line 275 of file ExecutionUtils.cpp.
References llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert(), Name, llvm::None, llvm::orc::Static, and llvm::Error::success().
1.8.13