|
LLVM
10.0.0
|
A set of symbols to look up, each associated with a SymbolLookupFlags value. More...
#include "llvm/ExecutionEngine/Orc/Core.h"
Public Types | |
| using | value_type = std::pair< SymbolStringPtr, SymbolLookupFlags > |
| using | UnderlyingVector = std::vector< value_type > |
| using | iterator = UnderlyingVector::iterator |
| using | const_iterator = UnderlyingVector::const_iterator |
Public Member Functions | |
| SymbolLookupSet ()=default | |
| SymbolLookupSet (SymbolStringPtr Name, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol) | |
| SymbolLookupSet (std::initializer_list< SymbolStringPtr > Names, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol) | |
| Construct a SymbolLookupSet from an initializer list of SymbolStringPtrs. More... | |
| SymbolLookupSet (const SymbolNameSet &Names, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol) | |
| Construct a SymbolLookupSet from a SymbolNameSet with the given Flags used for each value. More... | |
| SymbolLookupSet (ArrayRef< SymbolStringPtr > Names, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol) | |
| Construct a SymbolLookupSet from a vector of symbols with the given Flags used for each value. More... | |
| void | add (SymbolStringPtr Name, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol) |
| Add an element to the set. More... | |
| bool | empty () const |
| UnderlyingVector::size_type | size () const |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| void | remove (UnderlyingVector::size_type I) |
| Removes the Ith element of the vector, replacing it with the last element. More... | |
| void | remove (iterator I) |
| Removes the element pointed to by the given iterator. More... | |
| template<typename PredFn > | |
| void | remove_if (PredFn &&Pred) |
| Removes all elements matching the given predicate, which must be callable as bool(const SymbolStringPtr &, SymbolLookupFlags Flags). More... | |
| template<typename BodyFn > | |
| auto | forEachWithRemoval (BodyFn &&Body) -> typename std::enable_if< std::is_same< decltype(Body(std::declval< const SymbolStringPtr &>(), std::declval< SymbolLookupFlags >())), bool >::value >::type |
| Loop over the elements of this SymbolLookupSet, applying the Body function to each one. More... | |
| template<typename BodyFn > | |
| auto | forEachWithRemoval (BodyFn &&Body) -> typename std::enable_if< std::is_same< decltype(Body(std::declval< const SymbolStringPtr &>(), std::declval< SymbolLookupFlags >())), Expected< bool >>::value, Error >::type |
| Loop over the elements of this SymbolLookupSet, applying the Body function to each one. More... | |
| SymbolNameVector | getSymbolNames () const |
| Construct a SymbolNameVector from this instance by dropping the Flags values. More... | |
| void | sortByAddress () |
| Sort the lookup set by pointer value. More... | |
| void | sortByName () |
| Sort the lookup set lexicographically. More... | |
| void | removeDuplicates () |
| Remove any duplicate elements. More... | |
| bool | containsDuplicates () |
| Returns true if this set contains any duplicates. More... | |
A set of symbols to look up, each associated with a SymbolLookupFlags value.
This class is backed by a vector and optimized for fast insertion, deletion and iteration. It does not guarantee a stable order between operations, and will not automatically detect duplicate elements (they can be manually checked by calling the validate method).
| using llvm::orc::SymbolLookupSet::const_iterator = UnderlyingVector::const_iterator |
| using llvm::orc::SymbolLookupSet::iterator = UnderlyingVector::iterator |
| using llvm::orc::SymbolLookupSet::UnderlyingVector = std::vector<value_type> |
| using llvm::orc::SymbolLookupSet::value_type = std::pair<SymbolStringPtr, SymbolLookupFlags> |
|
default |
|
inlineexplicit |
|
inlineexplicit |
Construct a SymbolLookupSet from an initializer list of SymbolStringPtrs.
|
inlineexplicit |
Construct a SymbolLookupSet from a SymbolNameSet with the given Flags used for each value.
Definition at line 141 of file Core.h.
References add(), Name, and llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::size().
|
inlineexplicit |
Construct a SymbolLookupSet from a vector of symbols with the given Flags used for each value.
If the ArrayRef contains duplicates it is up to the client to remove these before using this instance for lookup.
Definition at line 153 of file Core.h.
References add(), Name, and llvm::ArrayRef< T >::size().
|
inline |
Add an element to the set.
The client is responsible for checking that duplicates are not added.
Definition at line 163 of file Core.h.
Referenced by llvm::orc::ReExportsMaterializationUnit::getName(), llvm::orc::ObjectLinkingLayerJITLinkContext::lookup(), and llvm::orc::CtorDtorRunner::run().
|
inline |
|
inline |
Returns true if this set contains any duplicates.
This should only be used in assertions.
Definition at line 285 of file Core.h.
Referenced by llvm::orc::CtorDtorRunner::run().
|
inline |
Definition at line 168 of file Core.h.
Referenced by llvm::orc::buildSimpleReexportsAliasMap(), llvm::orc::ReExportsMaterializationUnit::getName(), and llvm::orc::JITDylib::lookupFlags().
|
inline |
|
inline |
Loop over the elements of this SymbolLookupSet, applying the Body function to each one.
Body must be callable as bool(const SymbolStringPtr &, SymbolLookupFlags). If Body returns true then the element just passed in is removed from the set. If Body returns false then the element is retained.
|
inline |
Loop over the elements of this SymbolLookupSet, applying the Body function to each one.
Body must be callable as Expected<bool>(const SymbolStringPtr &, SymbolLookupFlags). If Body returns a failure value, the loop exits immediately. If Body returns true then the element just passed in is removed from the set. If Body returns false then the element is retained.
Definition at line 227 of file Core.h.
References I, Name, and llvm::Error::success().
|
inline |
Construct a SymbolNameVector from this instance by dropping the Flags values.
Definition at line 249 of file Core.h.
Referenced by llvm::orc::buildSimpleReexportsAliasMap().
|
inline |
Removes the Ith element of the vector, replacing it with the last element.
Definition at line 176 of file Core.h.
References I, and std::swap().
|
inline |
Removes the element pointed to by the given iterator.
This iterator and all subsequent ones (including end()) are invalidated.
Definition at line 183 of file Core.h.
References llvm::sys::path::begin(), and I.
|
inline |
|
inline |
Remove any duplicate elements.
If a SymbolLookupSet is not duplicate-free by construction, this method can be used to turn it into a proper set.
|
inline |
Definition at line 169 of file Core.h.
Referenced by llvm::orc::AsynchronousSymbolQuery::AsynchronousSymbolQuery().
|
inline |
Sort the lookup set by pointer value.
This sort is fast but sensitive to allocation order and so should not be used where a consistent order is required.
Definition at line 260 of file Core.h.
References llvm::sort().
|
inline |
Sort the lookup set lexicographically.
This sort is slow but the order is unaffected by allocation order.
Definition at line 268 of file Core.h.
References llvm::sort().
Referenced by llvm::orc::buildSimpleReexportsAliasMap().
1.8.13