class Block

Declaration

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

Description

A memory block, either on the stack or in the heap. The storage described by the block immediately follows it in memory.

Declared at: clang/lib/AST/Interp/InterpBlock.h:35

Member Variables

protected clang::interp::Pointer* Pointers = nullptr
Start of the chain of pointers.
protected llvm::Optional<unsigned int> DeclID
Unique identifier of the declaration.
protected bool IsStatic = false
Flag indicating if the block has static storage duration.
protected bool IsExtern = false
Flag indicating if the block is an extern.
protected bool IsDead = false
Flag indicating if the pointer is dead.
protected clang::interp::Descriptor* Desc
Pointer to the stack slot descriptor.

Method Overview

  • public Block(clang::interp::Descriptor * Desc, bool IsStatic = false, bool IsExtern = false)
  • public Block(const llvm::Optional<unsigned int> & DeclID, clang::interp::Descriptor * Desc, bool IsStatic = false, bool IsExtern = false)
  • protected Block(clang::interp::Descriptor * Desc, bool IsExtern, bool IsStatic, bool IsDead)
  • protected void addPointer(clang::interp::Pointer * P)
  • protected void cleanup()
  • public char * data()
  • public template <typename T>T & deref()
  • public llvm::Optional<unsigned int> getDeclID() const
  • public clang::interp::Descriptor * getDescriptor() const
  • public clang::interp::InterpSize getSize() const
  • public bool hasPointers() const
  • public void invokeCtor()
  • public bool isExtern() const
  • public bool isStatic() const
  • public bool isTemporary() const
  • protected void movePointer(clang::interp::Pointer * From, clang::interp::Pointer * To)
  • protected void removePointer(clang::interp::Pointer * P)

Methods

Block(clang::interp::Descriptor* Desc,
      bool IsStatic = false,
      bool IsExtern = false)

Declared at: clang/lib/AST/Interp/InterpBlock.h:42

Parameters

clang::interp::Descriptor* Desc
bool IsStatic = false
bool IsExtern = false

Block(const llvm::Optional<unsigned int>& DeclID,
      clang::interp::Descriptor* Desc,
      bool IsStatic = false,
      bool IsExtern = false)

Declared at: clang/lib/AST/Interp/InterpBlock.h:38

Parameters

const llvm::Optional<unsigned int>& DeclID
clang::interp::Descriptor* Desc
bool IsStatic = false
bool IsExtern = false

Block(clang::interp::Descriptor* Desc,
      bool IsExtern,
      bool IsStatic,
      bool IsDead)

Declared at: clang/lib/AST/Interp/InterpBlock.h:81

Parameters

clang::interp::Descriptor* Desc
bool IsExtern
bool IsStatic
bool IsDead

void addPointer(clang::interp::Pointer* P)

Declared at: clang/lib/AST/Interp/InterpBlock.h:88

Parameters

clang::interp::Pointer* P

void cleanup()

Declared at: clang/lib/AST/Interp/InterpBlock.h:85

char* data()

Description

Returns a pointer to the stored data.

Declared at: clang/lib/AST/Interp/InterpBlock.h:62

template <typename T>
T& deref()

Description

Returns a view over the data.

Declared at: clang/lib/AST/Interp/InterpBlock.h:66

Templates

T

llvm::Optional<unsigned int> getDeclID() const

Description

Returns the declaration ID.

Declared at: clang/lib/AST/Interp/InterpBlock.h:59

clang::interp::Descriptor* getDescriptor() const

Description

Returns the block's descriptor.

Declared at: clang/lib/AST/Interp/InterpBlock.h:47

clang::interp::InterpSize getSize() const

Description

Returns the size of the block.

Declared at: clang/lib/AST/Interp/InterpBlock.h:57

bool hasPointers() const

Description

Checks if the block has any live pointers.

Declared at: clang/lib/AST/Interp/InterpBlock.h:49

void invokeCtor()

Description

Invokes the constructor.

Declared at: clang/lib/AST/Interp/InterpBlock.h:69

bool isExtern() const

Description

Checks if the block is extern.

Declared at: clang/lib/AST/Interp/InterpBlock.h:51

bool isStatic() const

Description

Checks if the block has static storage duration.

Declared at: clang/lib/AST/Interp/InterpBlock.h:53

bool isTemporary() const

Description

Checks if the block is temporary.

Declared at: clang/lib/AST/Interp/InterpBlock.h:55

void movePointer(clang::interp::Pointer* From,
                 clang::interp::Pointer* To)

Declared at: clang/lib/AST/Interp/InterpBlock.h:90

Parameters

clang::interp::Pointer* From
clang::interp::Pointer* To

void removePointer(clang::interp::Pointer* P)

Declared at: clang/lib/AST/Interp/InterpBlock.h:89

Parameters

clang::interp::Pointer* P