LLVM API Documentation

Public Member Functions
llvm::LexicalScopes Class Reference

#include <LexicalScopes.h>

List of all members.

Public Member Functions

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

Detailed Description

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

Definition at line 137 of file LexicalScopes.h.


Constructor & Destructor Documentation

Definition at line 139 of file LexicalScopes.h.


Member Function Documentation

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 311 of file LexicalScopes.cpp.

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

dump - Print data structures to dbgs().

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

Definition at line 149 of file LexicalScopes.h.

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

findAbstractScope - Find an abstract scope or return null.

Definition at line 182 of file LexicalScopes.h.

References I.

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

Definition at line 107 of file LexicalScopes.cpp.

References llvm::Function::getContext(), llvm::MDNode::getFunction(), llvm::DebugLoc::getScopeAndInlinedAt(), and I.

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

Definition at line 117 of file LexicalScopes.cpp.

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

findLexicalScope - Find regular lexical scope or return null.

Definition at line 192 of file LexicalScopes.h.

References I.

getAbstractScopesList - Return a reference to list of abstract scopes.

Definition at line 177 of file LexicalScopes.h.

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

getCurrentFunctionScope - Return lexical scope for the current function.

Definition at line 158 of file LexicalScopes.h.

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

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

Definition at line 287 of file LexicalScopes.cpp.

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

initialize - Scan machine function and constuct lexical scope nest.

initialize - Scan machine function and constuct lexical scope nest, resets the instance if necessary.

Definition at line 40 of file LexicalScopes.cpp.

References reset().

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

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

Definition at line 153 of file LexicalScopes.h.

releaseMemory - release memory.

reset - Reset the instance so that it's prepared for another function.

Definition at line 30 of file LexicalScopes.cpp.

References llvm::SmallVectorImpl< T >::clear().

Referenced by initialize().


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