clang  10.0.0svn
Classes | Public Member Functions | List of all members
clang::interp::InterpStack Class Referencefinal

Stack frame storing temporaries and parameters. More...

#include "/opt/doxygen-docs/src/llvm/tools/clang/lib/AST/Interp/InterpStack.h"

Public Member Functions

 InterpStack ()
 
 ~InterpStack ()
 Destroys the stack, freeing up storage. More...
 
template<typename T , typename... Tys>
void push (Tys &&... Args)
 Constructs a value in place on the top of the stack. More...
 
template<typename T >
pop ()
 Returns the value from the top of the stack and removes it. More...
 
template<typename T >
void discard ()
 Discards the top value from the stack. More...
 
template<typename T >
T & peek ()
 Returns a reference to the value on the top of the stack. More...
 
void * top ()
 Returns a pointer to the top object. More...
 
size_t size () const
 Returns the size of the stack in bytes. More...
 
void clear ()
 Clears the stack without calling any destructors. More...
 

Detailed Description

Stack frame storing temporaries and parameters.

Definition at line 22 of file InterpStack.h.

Constructor & Destructor Documentation

◆ InterpStack()

clang::interp::InterpStack::InterpStack ( )
inline

Definition at line 24 of file InterpStack.h.

References ~InterpStack().

◆ ~InterpStack()

InterpStack::~InterpStack ( )

Destroys the stack, freeing up storage.

Definition at line 16 of file InterpStack.cpp.

References clear().

Referenced by InterpStack().

Member Function Documentation

◆ clear()

void InterpStack::clear ( )

Clears the stack without calling any destructors.

Definition at line 20 of file InterpStack.cpp.

Referenced by size(), and ~InterpStack().

◆ discard()

template<typename T >
void clang::interp::InterpStack::discard ( )
inline

Discards the top value from the stack.

Definition at line 44 of file InterpStack.h.

Referenced by clang::interp::InterpFrame::popArgs().

◆ peek()

template<typename T >
T& clang::interp::InterpStack::peek ( )
inline

◆ pop()

template<typename T >
T clang::interp::InterpStack::pop ( )
inline

◆ push()

template<typename T , typename... Tys>
void clang::interp::InterpStack::push ( Tys &&...  Args)
inline

◆ size()

size_t clang::interp::InterpStack::size ( ) const
inline

Returns the size of the stack in bytes.

Definition at line 59 of file InterpStack.h.

References clear(), and peek().

◆ top()

void* clang::interp::InterpStack::top ( )
inline

Returns a pointer to the top object.

Definition at line 56 of file InterpStack.h.

References peek().


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