LLVM 22.0.0git
llvm::LexicalScope Class Reference

This class is used to track scope information. More...

#include "llvm/CodeGen/LexicalScopes.h"

Public Member Functions

 LexicalScope (LexicalScope *P, const DILocalScope *D, const DILocation *I, bool A)
LexicalScopegetParent () const
const MDNodegetDesc () const
const DILocationgetInlinedAt () const
const DILocalScopegetScopeNode () const
bool isAbstractScope () const
SmallVectorImpl< LexicalScope * > & getChildren ()
SmallVectorImpl< InsnRange > & getRanges ()
void addChild (LexicalScope *S)
 Add a child scope.
void openInsnRange (const MachineInstr *MI)
 This scope covers instruction range starting from MI.
void extendInsnRange (const MachineInstr *MI)
 Extend the current instruction range covered by this scope.
void closeInsnRange (LexicalScope *NewScope=nullptr)
 Create a range based on FirstInsn and LastInsn collected until now.
bool dominates (const LexicalScope *S) const
 Return true if current scope dominates given lexical scope.
unsigned getDFSOut () const
void setDFSOut (unsigned O)
unsigned getDFSIn () const
void setDFSIn (unsigned I)
LLVM_ABI void dump (unsigned Indent=0) const
 Print lexical scope.

Detailed Description

This class is used to track scope information.

Definition at line 44 of file LexicalScopes.h.

Constructor & Destructor Documentation

◆ LexicalScope()

llvm::LexicalScope::LexicalScope ( LexicalScope * P,
const DILocalScope * D,
const DILocation * I,
bool A )
inline

Member Function Documentation

◆ addChild()

void llvm::LexicalScope::addChild ( LexicalScope * S)
inline

Add a child scope.

Definition at line 69 of file LexicalScopes.h.

References LexicalScope().

◆ closeInsnRange()

void llvm::LexicalScope::closeInsnRange ( LexicalScope * NewScope = nullptr)
inline

Create a range based on FirstInsn and LastInsn collected until now.

This is used when a new scope is encountered while walking machine instructions.

Definition at line 91 of file LexicalScopes.h.

References assert(), and LexicalScope().

◆ dominates()

bool llvm::LexicalScope::dominates ( const LexicalScope * S) const
inline

Return true if current scope dominates given lexical scope.

Definition at line 103 of file LexicalScopes.h.

References getDFSIn(), getDFSOut(), and LexicalScope().

◆ dump()

LLVM_DUMP_METHOD void LexicalScope::dump ( unsigned Indent = 0) const

Print lexical scope.

Definition at line 345 of file LexicalScopes.cpp.

References llvm::dbgs(), llvm::raw_ostream::indent(), LexicalScope(), LLVM_DUMP_METHOD, and N.

◆ extendInsnRange()

void llvm::LexicalScope::extendInsnRange ( const MachineInstr * MI)
inline

Extend the current instruction range covered by this scope.

Definition at line 81 of file LexicalScopes.h.

References assert(), and MI.

◆ getChildren()

SmallVectorImpl< LexicalScope * > & llvm::LexicalScope::getChildren ( )
inline

Definition at line 65 of file LexicalScopes.h.

Referenced by llvm::DebugHandlerBase::identifyScopeMarkers().

◆ getDesc()

const MDNode * llvm::LexicalScope::getDesc ( ) const
inline

Definition at line 61 of file LexicalScopes.h.

◆ getDFSIn()

unsigned llvm::LexicalScope::getDFSIn ( ) const
inline

Definition at line 114 of file LexicalScopes.h.

Referenced by dominates().

◆ getDFSOut()

unsigned llvm::LexicalScope::getDFSOut ( ) const
inline

Definition at line 112 of file LexicalScopes.h.

Referenced by dominates().

◆ getInlinedAt()

const DILocation * llvm::LexicalScope::getInlinedAt ( ) const
inline

Definition at line 62 of file LexicalScopes.h.

◆ getParent()

LexicalScope * llvm::LexicalScope::getParent ( ) const
inline

Definition at line 60 of file LexicalScopes.h.

References LexicalScope().

◆ getRanges()

SmallVectorImpl< InsnRange > & llvm::LexicalScope::getRanges ( )
inline

◆ getScopeNode()

const DILocalScope * llvm::LexicalScope::getScopeNode ( ) const
inline

Definition at line 63 of file LexicalScopes.h.

Referenced by llvm::DwarfDebug::endFunctionImpl().

◆ isAbstractScope()

bool llvm::LexicalScope::isAbstractScope ( ) const
inline

Definition at line 64 of file LexicalScopes.h.

Referenced by llvm::DebugHandlerBase::identifyScopeMarkers().

◆ openInsnRange()

void llvm::LexicalScope::openInsnRange ( const MachineInstr * MI)
inline

This scope covers instruction range starting from MI.

Definition at line 72 of file LexicalScopes.h.

References MI.

◆ setDFSIn()

void llvm::LexicalScope::setDFSIn ( unsigned I)
inline

Definition at line 115 of file LexicalScopes.h.

References I.

◆ setDFSOut()

void llvm::LexicalScope::setDFSOut ( unsigned O)
inline

Definition at line 113 of file LexicalScopes.h.


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