LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::LexicalScopes Class Reference

#include <LexicalScopes.h>

Public Member Functions

 LexicalScopes ()
 
virtual ~LexicalScopes ()
 
virtual void initialize (const MachineFunction &)
 initialize - Scan machine function and constuct lexical scope nest. More...
 
virtual void releaseMemory ()
 releaseMemory - release memory. More...
 
bool empty ()
 empty - Return true if there is any lexical scope information available. More...
 
bool isCurrentFunctionScope (const LexicalScope *LS)
 
LexicalScopegetCurrentFunctionScope () const
 getCurrentFunctionScope - Return lexical scope for the current function. More...
 
void getMachineBasicBlocks (DebugLoc DL, SmallPtrSet< const MachineBasicBlock *, 4 > &MBBs)
 
bool dominates (DebugLoc DL, MachineBasicBlock *MBB)
 
LexicalScopefindLexicalScope (DebugLoc DL)
 
ArrayRef< LexicalScope * > getAbstractScopesList () const
 getAbstractScopesList - Return a reference to list of abstract scopes. More...
 
LexicalScopefindAbstractScope (const MDNode *N)
 findAbstractScope - Find an abstract scope or return NULL. More...
 
LexicalScopefindInlinedScope (DebugLoc DL)
 
LexicalScopefindLexicalScope (const MDNode *N)
 findLexicalScope - Find regular lexical scope or return NULL. More...
 
void dump ()
 dump - Print data structures to dbgs(). More...
 

Detailed Description

LexicalScopes - This class provides interface to collect and use lexical scoping information from machine instruction.

Definition at line 45 of file LexicalScopes.h.

Constructor & Destructor Documentation

llvm::LexicalScopes::LexicalScopes ( )
inline

Definition at line 47 of file LexicalScopes.h.

LexicalScopes::~LexicalScopes ( )
virtual

Definition at line 28 of file LexicalScopes.cpp.

References releaseMemory().

Member Function Documentation

bool LexicalScopes::dominates ( DebugLoc  DL,
MachineBasicBlock MBB 
)

dominates - Return true if DebugLoc's lexical scope dominates at least one machine instruction's lexical scope in a given machine basic block.

Definition at line 292 of file LexicalScopes.cpp.

References llvm::MachineBasicBlock::begin(), llvm::LexicalScope::dominates(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getParent(), I, and llvm::DebugLoc::isUnknown().

void llvm::LexicalScopes::dump ( )

dump - Print data structures to dbgs().

bool llvm::LexicalScopes::empty ( )
inline

empty - Return true if there is any lexical scope information available.

Definition at line 57 of file LexicalScopes.h.

Referenced by llvm::DwarfDebug::beginFunction(), and llvm::DwarfDebug::endFunction().

LexicalScope* llvm::LexicalScopes::findAbstractScope ( const MDNode N)
inline

findAbstractScope - Find an abstract scope or return NULL.

Definition at line 88 of file LexicalScopes.h.

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

LexicalScope* llvm::LexicalScopes::findInlinedScope ( DebugLoc  DL)
inline

findInlinedScope - Find an inlined scope for the given DebugLoc or return NULL.

Definition at line 94 of file LexicalScopes.h.

LexicalScope * LexicalScopes::findLexicalScope ( DebugLoc  DL)

findLexicalScope - Find lexical scope, either regular or inlined, for the given DebugLoc. Return NULL if not found.

Definition at line 116 of file LexicalScopes.cpp.

References llvm::Function::getContext(), llvm::DebugLoc::getFromDILocation(), llvm::MachineFunction::getFunction(), llvm::DILexicalBlockFile::getScope(), llvm::DebugLoc::getScopeAndInlinedAt(), and llvm::DIDescriptor::isLexicalBlockFile().

LexicalScope* llvm::LexicalScopes::findLexicalScope ( const MDNode N)
inline

findLexicalScope - Find regular lexical scope or return NULL.

Definition at line 99 of file LexicalScopes.h.

ArrayRef<LexicalScope *> llvm::LexicalScopes::getAbstractScopesList ( ) const
inline

getAbstractScopesList - Return a reference to list of abstract scopes.

Definition at line 83 of file LexicalScopes.h.

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

LexicalScope* llvm::LexicalScopes::getCurrentFunctionScope ( ) const
inline

getCurrentFunctionScope - Return lexical scope for the current function.

Definition at line 66 of file LexicalScopes.h.

Referenced by llvm::DwarfDebug::beginFunction(), and llvm::DwarfDebug::endFunction().

void LexicalScopes::getMachineBasicBlocks ( DebugLoc  DL,
SmallPtrSet< const MachineBasicBlock *, 4 > &  MBBs 
)

getMachineBasicBlocks - Populate given set using machine basic blocks which have machine instructions that belong to lexical scope identified by DebugLoc.

Definition at line 268 of file LexicalScopes.cpp.

References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::MachineFunction::begin(), llvm::SmallPtrSetImpl::clear(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::MachineFunction::end(), llvm::LexicalScope::getRanges(), I, and llvm::SmallPtrSet< PtrType, SmallSize >::insert().

void LexicalScopes::initialize ( const MachineFunction Fn)
virtual

initialize - Scan machine function and constuct lexical scope nest.

Definition at line 43 of file LexicalScopes.cpp.

References releaseMemory().

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

bool llvm::LexicalScopes::isCurrentFunctionScope ( const LexicalScope LS)
inline

isCurrentFunctionScope - Return true if given lexical scope represents current function.

Definition at line 61 of file LexicalScopes.h.

void LexicalScopes::releaseMemory ( )
virtual

releaseMemory - release memory.

Definition at line 33 of file LexicalScopes.cpp.

References llvm::DeleteContainerSeconds().

Referenced by initialize(), and ~LexicalScopes().


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