class SymbolLookupSet

Declaration

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

Description

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

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:175

Member Variables

private llvm::orc::SymbolLookupSet::UnderlyingVector Symbols

Method Overview

  • public SymbolLookupSet(llvm::orc::SymbolStringPtr Name, llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol)
  • public SymbolLookupSet(std::initializer_list<SymbolStringPtr> Names, llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol)
  • public SymbolLookupSet(const llvm::orc::SymbolNameSet & Names, llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol)
  • public SymbolLookupSet(ArrayRef<llvm::orc::SymbolStringPtr> Names, llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol)
  • public SymbolLookupSet()
  • public llvm::orc::SymbolLookupSet & add(llvm::orc::SymbolStringPtr Name, llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol)
  • public llvm::orc::SymbolLookupSet & append(llvm::orc::SymbolLookupSet Other)
  • public llvm::orc::SymbolLookupSet::iterator begin()
  • public llvm::orc::SymbolLookupSet::const_iterator begin() const
  • public bool containsDuplicates()
  • public bool empty() const
  • public llvm::orc::SymbolLookupSet::const_iterator end() const
  • public llvm::orc::SymbolLookupSet::iterator end()
  • public template <typename BodyFn>auto forEachWithRemoval(BodyFn && Body) -> std::enable_if_t<std::is_same<decltype(Body(std::declval<const SymbolStringPtr &>(), std::declval<SymbolLookupFlags>())), bool>::value>
  • public template <typename BodyFn>auto forEachWithRemoval(BodyFn && Body) -> std::enable_if_t<std::is_same<decltype(Body(std::declval<const SymbolStringPtr &>(), std::declval<SymbolLookupFlags>())), Expected<bool>>::value, Error>
  • public template <typename KeyT>static llvm::orc::SymbolLookupSet fromMapKeys(const DenseMap<llvm::orc::SymbolStringPtr, KeyT> & M, llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol)
  • public llvm::orc::SymbolNameVector getSymbolNames() const
  • public void remove(UnderlyingVector::size_type I)
  • public void remove(llvm::orc::SymbolLookupSet::iterator I)
  • public void removeDuplicates()
  • public template <typename PredFn>void remove_if(PredFn && Pred)
  • public UnderlyingVector::size_type size() const
  • public void sortByAddress()
  • public void sortByName()

Methods

SymbolLookupSet(
    llvm::orc::SymbolStringPtr Name,
    llvm::orc::SymbolLookupFlags Flags =
        SymbolLookupFlags::RequiredSymbol)

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:184

Parameters

llvm::orc::SymbolStringPtr Name
llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol

SymbolLookupSet(
    std::initializer_list<SymbolStringPtr> Names,
    llvm::orc::SymbolLookupFlags Flags =
        SymbolLookupFlags::RequiredSymbol)

Description

Construct a SymbolLookupSet from an initializer list of SymbolStringPtrs.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:191

Parameters

std::initializer_list<SymbolStringPtr> Names
llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol

SymbolLookupSet(
    const llvm::orc::SymbolNameSet& Names,
    llvm::orc::SymbolLookupFlags Flags =
        SymbolLookupFlags::RequiredSymbol)

Description

Construct a SymbolLookupSet from a SymbolNameSet with the given Flags used for each value.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:201

Parameters

const llvm::orc::SymbolNameSet& Names
llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol

SymbolLookupSet(
    ArrayRef<llvm::orc::SymbolStringPtr> Names,
    llvm::orc::SymbolLookupFlags Flags =
        SymbolLookupFlags::RequiredSymbol)

Description

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.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:213

Parameters

ArrayRef<llvm::orc::SymbolStringPtr> Names
llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol

SymbolLookupSet()

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:182

llvm::orc::SymbolLookupSet& add(
    llvm::orc::SymbolStringPtr Name,
    llvm::orc::SymbolLookupFlags Flags =
        SymbolLookupFlags::RequiredSymbol)

Description

Add an element to the set. The client is responsible for checking that duplicates are not added.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:236

Parameters

llvm::orc::SymbolStringPtr Name
llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol

llvm::orc::SymbolLookupSet& append(
    llvm::orc::SymbolLookupSet Other)

Description

Quickly append one lookup set to another.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:243

Parameters

llvm::orc::SymbolLookupSet Other

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

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:252

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

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:254

bool containsDuplicates()

Description

Returns true if this set contains any duplicates. This should only be used in assertions.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:363

bool empty() const

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:250

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

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:255

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

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:253

template <typename BodyFn>
auto forEachWithRemoval(BodyFn&& Body)
    -> std::enable_if_t<std::is_same<
        decltype(Body(
            std::declval<
                const SymbolStringPtr&>(),
            std::declval<SymbolLookupFlags>())),
        bool>::value>

Description

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.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:287

Templates

BodyFn

Parameters

BodyFn&& Body

template <typename BodyFn>
auto forEachWithRemoval(BodyFn&& Body)
    -> std::enable_if_t<
        std::is_same<
            decltype(Body(
                std::declval<
                    const SymbolStringPtr&>(),
                std::declval<
                    SymbolLookupFlags>())),
            Expected<bool>>::value,
        Error>

Description

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.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:309

Templates

BodyFn

Parameters

BodyFn&& Body

template <typename KeyT>
static llvm::orc::SymbolLookupSet fromMapKeys(
    const DenseMap<llvm::orc::SymbolStringPtr,
                   KeyT>& M,
    llvm::orc::SymbolLookupFlags Flags =
        SymbolLookupFlags::RequiredSymbol)

Description

Construct a SymbolLookupSet from DenseMap keys.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:224

Templates

KeyT

Parameters

const DenseMap<llvm::orc::SymbolStringPtr, KeyT>& M
llvm::orc::SymbolLookupFlags Flags = SymbolLookupFlags::RequiredSymbol

llvm::orc::SymbolNameVector getSymbolNames() const

Description

Construct a SymbolNameVector from this instance by dropping the Flags values.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:331

void remove(UnderlyingVector::size_type I)

Description

Removes the Ith element of the vector, replacing it with the last element.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:258

Parameters

UnderlyingVector::size_type I

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

Description

Removes the element pointed to by the given iterator. This iterator and all subsequent ones (including end()) are invalidated.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:265

Parameters

llvm::orc::SymbolLookupSet::iterator I

void removeDuplicates()

Description

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.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:354

template <typename PredFn>
void remove_if(PredFn&& Pred)

Description

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

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:269

Templates

PredFn

Parameters

PredFn&& Pred

UnderlyingVector::size_type size() const

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:251

void sortByAddress()

Description

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.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:342

void sortByName()

Description

Sort the lookup set lexicographically. This sort is slow but the order is unaffected by allocation order.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Core.h:346