LLVM API Documentation
#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) |
LexicalScope * | getCurrentFunctionScope () 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) |
LexicalScope * | findLexicalScope (DebugLoc DL) |
ArrayRef< LexicalScope * > | getAbstractScopesList () const |
getAbstractScopesList - Return a reference to list of abstract scopes. More... | |
LexicalScope * | findAbstractScope (const MDNode *N) |
findAbstractScope - Find an abstract scope or return NULL. More... | |
LexicalScope * | findInlinedScope (DebugLoc DL) |
LexicalScope * | findLexicalScope (const MDNode *N) |
findLexicalScope - Find regular lexical scope or return NULL. More... | |
void | dump () |
dump - Print data structures to dbgs(). More... | |
LexicalScopes - This class provides interface to collect and use lexical scoping information from machine instruction.
Definition at line 45 of file LexicalScopes.h.
|
inline |
Definition at line 47 of file LexicalScopes.h.
|
virtual |
Definition at line 28 of file LexicalScopes.cpp.
References releaseMemory().
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().
|
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().
|
inline |
findAbstractScope - Find an abstract scope or return NULL.
Definition at line 88 of file LexicalScopes.h.
Referenced by llvm::DwarfDebug::endFunction().
|
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().
|
inline |
findLexicalScope - Find regular lexical scope or return NULL.
Definition at line 99 of file LexicalScopes.h.
|
inline |
getAbstractScopesList - Return a reference to list of abstract scopes.
Definition at line 83 of file LexicalScopes.h.
Referenced by llvm::DwarfDebug::endFunction().
|
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().
|
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().
|
inline |
isCurrentFunctionScope - Return true if given lexical scope represents current function.
Definition at line 61 of file LexicalScopes.h.
|
virtual |
releaseMemory - release memory.
Definition at line 33 of file LexicalScopes.cpp.
References llvm::DeleteContainerSeconds().
Referenced by initialize(), and ~LexicalScopes().