LLVM: llvm::orc::SymbolLookupSet Class Reference (original) (raw)

A set of symbols to look up, each associated with a SymbolLookupFlags value. More...

#include "[llvm/ExecutionEngine/Orc/Core.h](llvm%5F2ExecutionEngine%5F2Orc%5F2Core%5F8h%5Fsource.html)"

Public Member Functions
SymbolLookupSet ()=default
SymbolLookupSet (std::initializer_list< value_type > Elems)
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.
SymbolLookupSet (const SymbolNameSet &Names, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol)
Construct a SymbolLookupSet from a SymbolNameSet with the given Flags used for each value.
SymbolLookupSet (ArrayRef< SymbolStringPtr > Names, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol)
Construct a SymbolLookupSet from a vector of symbols with the given Flags used for each value.
SymbolLookupSet & add (SymbolStringPtr Name, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol)
Add an element to the set.
SymbolLookupSet & append (SymbolLookupSet Other)
Quickly append one lookup set to another.
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.
void remove (iterator I)
Removes the element pointed to by the given iterator.
template
void remove_if (PredFn &&Pred)
Removes all elements matching the given predicate, which must be callable as bool(const SymbolStringPtr &, SymbolLookupFlags Flags).
template
auto forEachWithRemoval (BodyFn &&Body) -> std::enable_if_t< std::is_same< decltype(Body(std::declval< const SymbolStringPtr & >(), std::declval< SymbolLookupFlags >())), bool >::value >
Loop over the elements of this SymbolLookupSet, applying the Body function to each one.
template
auto forEachWithRemoval (BodyFn &&Body) -> std::enable_if_t< std::is_same< decltype(Body(std::declval< const SymbolStringPtr & >(), std::declval< SymbolLookupFlags >())), Expected< bool > >::value, Error >
Loop over the elements of this SymbolLookupSet, applying the Body function to each one.
SymbolNameVector getSymbolNames () const
Construct a SymbolNameVector from this instance by dropping the Flags values.
void sortByAddress ()
Sort the lookup set by pointer value.
void sortByName ()
Sort the lookup set lexicographically.
void removeDuplicates ()
Remove any duplicate elements.
bool containsDuplicates ()
Returns true if this set contains any duplicates.

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).

Definition at line 199 of file Core.h.

const_iterator

using llvm::orc::SymbolLookupSet::const_iterator = UnderlyingVector::const_iterator

Definition at line 204 of file Core.h.

iterator

using llvm::orc::SymbolLookupSet::iterator = UnderlyingVector::iterator

Definition at line 203 of file Core.h.

UnderlyingVector

value_type

llvm::orc::SymbolLookupSet::SymbolLookupSet ( ) default

SymbolLookupSet() [2/6]

llvm::orc::SymbolLookupSet::SymbolLookupSet ( std::initializer_list< value_type > Elems) inline

SymbolLookupSet() [3/6]

SymbolLookupSet() [4/6]

SymbolLookupSet() [5/6]

SymbolLookupSet() [6/6]

add()

append()

Quickly append one lookup set to another.

Definition at line 272 of file Core.h.

References llvm::Other, and SymbolLookupSet().

begin() [1/2]

iterator llvm::orc::SymbolLookupSet::begin ( ) inline

begin() [2/2]

const_iterator llvm::orc::SymbolLookupSet::begin ( ) const inline

Definition at line 283 of file Core.h.

containsDuplicates()

bool llvm::orc::SymbolLookupSet::containsDuplicates ( ) inline

empty()

bool llvm::orc::SymbolLookupSet::empty ( ) const inline

end() [1/2]

iterator llvm::orc::SymbolLookupSet::end ( ) inline

Definition at line 282 of file Core.h.

end() [2/2]

const_iterator llvm::orc::SymbolLookupSet::end ( ) const inline

Definition at line 284 of file Core.h.

forEachWithRemoval() [1/2]

template

auto llvm::orc::SymbolLookupSet::forEachWithRemoval ( BodyFn && Body) -> std::enable_if_t< std::is_same<decltype(Body(std::declval<const SymbolStringPtr &>(), std::declval<SymbolLookupFlags>())),bool>::value> 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.

Definition at line 316 of file Core.h.

References I, and remove().

forEachWithRemoval() [2/2]

template

Loop over the elements of this SymbolLookupSet, applying the Body function to each one.

Body must be callable as Expected(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 338 of file Core.h.

References I, remove(), and llvm::Error::success().

fromMapKeys()

getSymbolNames()

remove() [1/2]

void llvm::orc::SymbolLookupSet::remove ( iterator I) inline

Removes the element pointed to by the given iterator.

This iterator and all subsequent ones (including end()) are invalidated.

Definition at line 294 of file Core.h.

References begin(), I, and remove().

Referenced by remove().

remove() [2/2]

void llvm::orc::SymbolLookupSet::remove ( UnderlyingVector::size_type I) inline

remove_if()

template

void llvm::orc::SymbolLookupSet::remove_if ( PredFn && Pred) inline

Removes all elements matching the given predicate, which must be callable as bool(const SymbolStringPtr &, SymbolLookupFlags Flags).

Definition at line 298 of file Core.h.

References I, and remove().

removeDuplicates()

void llvm::orc::SymbolLookupSet::removeDuplicates ( ) inline

size()

UnderlyingVector::size_type llvm::orc::SymbolLookupSet::size ( ) const inline

sortByAddress()

void llvm::orc::SymbolLookupSet::sortByAddress ( ) inline

sortByName()

void llvm::orc::SymbolLookupSet::sortByName ( ) inline

Sort the lookup set lexicographically.

This sort is slow but the order is unaffected by allocation order.

Definition at line 375 of file Core.h.

References LHS, RHS, and llvm::sort().


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