LLVM  6.0.0svn
Classes | Public Member Functions | List of all members
llvm::orc::CtorDtorIterator Class Reference

This iterator provides a convenient way to iterate over the elements of an llvm.global_ctors/llvm.global_dtors instance. More...

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

Classes

struct  Element
 Accessor for an element of the global_ctors/global_dtors array. More...
 

Public Member Functions

 CtorDtorIterator (const GlobalVariable *GV, bool End)
 Construct an iterator instance. More...
 
bool operator== (const CtorDtorIterator &Other) const
 Test iterators for equality. More...
 
bool operator!= (const CtorDtorIterator &Other) const
 Test iterators for inequality. More...
 
CtorDtorIteratoroperator++ ()
 Pre-increment iterator. More...
 
CtorDtorIterator operator++ (int)
 Post-increment iterator. More...
 
Element operator* () const
 Dereference iterator. More...
 

Detailed Description

This iterator provides a convenient way to iterate over the elements of an llvm.global_ctors/llvm.global_dtors instance.

The easiest way to get hold of instances of this class is to use the getConstructors/getDestructors functions.

Definition at line 43 of file ExecutionUtils.h.

Constructor & Destructor Documentation

◆ CtorDtorIterator()

llvm::orc::CtorDtorIterator::CtorDtorIterator ( const GlobalVariable GV,
bool  End 
)

Construct an iterator instance.

If End is true then this iterator acts as the end of the range, otherwise it is the beginning.

Definition at line 20 of file ExecutionUtils.cpp.

Referenced by llvm::orc::getConstructors(), and llvm::orc::getDestructors().

Member Function Documentation

◆ operator!=()

bool llvm::orc::CtorDtorIterator::operator!= ( const CtorDtorIterator Other) const

Test iterators for inequality.

Definition at line 31 of file ExecutionUtils.cpp.

◆ operator*()

CtorDtorIterator::Element llvm::orc::CtorDtorIterator::operator* ( ) const

Dereference iterator.

The resulting value provides a read-only view of this element of the global_ctors/global_dtors list.

Definition at line 46 of file ExecutionUtils.cpp.

References assert(), llvm::Data, llvm::dyn_cast(), F(), llvm::User::getOperand(), and llvm::ConstantInt::getZExtValue().

◆ operator++() [1/2]

CtorDtorIterator & llvm::orc::CtorDtorIterator::operator++ ( )

Pre-increment iterator.

Definition at line 35 of file ExecutionUtils.cpp.

◆ operator++() [2/2]

CtorDtorIterator llvm::orc::CtorDtorIterator::operator++ ( int  )

Post-increment iterator.

Definition at line 40 of file ExecutionUtils.cpp.

◆ operator==()

bool llvm::orc::CtorDtorIterator::operator== ( const CtorDtorIterator Other) const

Test iterators for equality.

Definition at line 26 of file ExecutionUtils.cpp.

References assert().


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