LLVM API Documentation

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

DISubprogram - This is a wrapper for a subprogram (e.g. a function). More...

#include <DebugInfo.h>

Inheritance diagram for llvm::DISubprogram:
Inheritance graph
[legend]
Collaboration diagram for llvm::DISubprogram:
Collaboration graph
[legend]

Public Member Functions

 DISubprogram (const MDNode *N=0)
 
DIScopeRef getContext () const
 
StringRef getName () const
 
StringRef getDisplayName () const
 
StringRef getLinkageName () const
 
unsigned getLineNumber () const
 
DICompositeType getType () const
 
unsigned isLocalToUnit () const
 
unsigned isDefinition () const
 
unsigned getVirtuality () const
 
unsigned getVirtualIndex () const
 
DITypeRef getContainingType () const
 
unsigned getFlags () const
 
unsigned isArtificial () const
 
bool isPrivate () const
 
bool isProtected () const
 
bool isExplicit () const
 isExplicit - Return true if this subprogram is marked as explicit. More...
 
bool isPrototyped () const
 isPrototyped - Return true if this subprogram is prototyped. More...
 
unsigned isOptimized () const
 
bool Verify () const
 Verify - Verify that a subprogram descriptor is well formed. More...
 
bool describes (const Function *F)
 
FunctiongetFunction () const
 
void replaceFunction (Function *F)
 
DIArray getTemplateParams () const
 
DISubprogram getFunctionDeclaration () const
 
MDNodegetVariablesNodes () const
 
DIArray getVariables () const
 
unsigned getScopeLineNumber () const
 
- Public Member Functions inherited from llvm::DIScope
 DIScope (const MDNode *N=0)
 
DIScopeRef getContext () const
 
StringRef getName () const
 If the scope node has a name, return that, else return an empty string. More...
 
StringRef getFilename () const
 
StringRef getDirectory () const
 
DIScopeRef getRef () const
 
- Public Member Functions inherited from llvm::DIDescriptor
 DIDescriptor (const MDNode *N=0)
 
bool Verify () const
 
 operator MDNode * () const
 
MDNodeoperator-> () const
 
LLVM_EXPLICIT operator bool () const
 
bool operator== (DIDescriptor Other) const
 
bool operator!= (DIDescriptor Other) const
 
uint16_t getTag () const
 
bool isDerivedType () const
 isDerivedType - Return true if the specified tag is legal for DIDerivedType. More...
 
bool isCompositeType () const
 
bool isBasicType () const
 
bool isVariable () const
 isVariable - Return true if the specified tag is legal for DIVariable. More...
 
bool isSubprogram () const
 
bool isGlobalVariable () const
 
bool isScope () const
 
bool isFile () const
 isFile - Return true if the specified tag is DW_TAG_file_type. More...
 
bool isCompileUnit () const
 isCompileUnit - Return true if the specified tag is DW_TAG_compile_unit. More...
 
bool isNameSpace () const
 isNameSpace - Return true if the specified tag is DW_TAG_namespace. More...
 
bool isLexicalBlockFile () const
 
bool isLexicalBlock () const
 isLexicalBlock - Return true if the specified tag is DW_TAG_lexical_block. More...
 
bool isSubrange () const
 isSubrange - Return true if the specified tag is DW_TAG_subrange_type. More...
 
bool isEnumerator () const
 isEnumerator - Return true if the specified tag is DW_TAG_enumerator. More...
 
bool isType () const
 isType - Return true if the specified tag is legal for DIType. More...
 
bool isUnspecifiedParameter () const
 
bool isTemplateTypeParameter () const
 
bool isTemplateValueParameter () const
 
bool isObjCProperty () const
 isObjCProperty - Return true if the specified tag is DW_TAG_APPLE_property. More...
 
bool isImportedEntity () const
 Return true if the specified tag is DW_TAG_imported_module or DW_TAG_imported_declaration. More...
 
void print (raw_ostream &OS) const
 print - print descriptor. More...
 
void dump () const
 dump - print descriptor to dbgs() with a newline. More...
 

Friends

class DIDescriptor
 

Additional Inherited Members

- Public Types inherited from llvm::DIDescriptor
enum  {
  FlagPrivate = 1 << 0, FlagProtected = 1 << 1, FlagFwdDecl = 1 << 2, FlagAppleBlock = 1 << 3,
  FlagBlockByrefStruct = 1 << 4, FlagVirtual = 1 << 5, FlagArtificial = 1 << 6, FlagExplicit = 1 << 7,
  FlagPrototyped = 1 << 8, FlagObjcClassComplete = 1 << 9, FlagObjectPointer = 1 << 10, FlagVector = 1 << 11,
  FlagStaticMember = 1 << 12, FlagIndirectVariable = 1 << 13
}
 
- Protected Member Functions inherited from llvm::DIScope
void printInternal (raw_ostream &OS) const
 
- Protected Member Functions inherited from llvm::DIDescriptor
StringRef getStringField (unsigned Elt) const
 
unsigned getUnsignedField (unsigned Elt) const
 
uint64_t getUInt64Field (unsigned Elt) const
 
int64_t getInt64Field (unsigned Elt) const
 
DIDescriptor getDescriptorField (unsigned Elt) const
 
template<typename DescTy >
DescTy getFieldAs (unsigned Elt) const
 
GlobalVariablegetGlobalVariableField (unsigned Elt) const
 
ConstantgetConstantField (unsigned Elt) const
 
FunctiongetFunctionField (unsigned Elt) const
 
void replaceFunctionField (unsigned Elt, Function *F)
 
template<>
DIScopeRef getFieldAs (unsigned Elt) const
 Specialize getFieldAs to handle fields that are references to DIScopes. More...
 
template<>
DITypeRef getFieldAs (unsigned Elt) const
 Specialize getFieldAs to handle fields that are references to DITypes. More...
 
template<>
DIScopeRef getFieldAs (unsigned Elt) const
 Specialize getFieldAs to handle fields that are references to DIScopes. More...
 
template<>
DITypeRef getFieldAs (unsigned Elt) const
 Specialize getFieldAs to handle fields that are references to DITypes. More...
 
- Protected Attributes inherited from llvm::DIDescriptor
const MDNodeDbgNode
 

Detailed Description

DISubprogram - This is a wrapper for a subprogram (e.g. a function).

Definition at line 429 of file DebugInfo.h.

Constructor & Destructor Documentation

llvm::DISubprogram::DISubprogram ( const MDNode N = 0)
inlineexplicit

Definition at line 434 of file DebugInfo.h.

Member Function Documentation

bool DISubprogram::describes ( const Function F)

describes - Return true if this subprogram provides debugging information for the function F.

Definition at line 705 of file DebugInfo.cpp.

References llvm::StringRef::empty(), llvm::Intrinsic::getName(), and llvm::Value::getName().

Referenced by llvm::DIVariable::isInlinedFnArgument().

DITypeRef llvm::DISubprogram::getContainingType ( ) const
inline

Definition at line 451 of file DebugInfo.h.

Referenced by llvm::CompileUnit::getOrCreateSubprogramDIE().

DIScopeRef llvm::DISubprogram::getContext ( ) const
inline

Definition at line 436 of file DebugInfo.h.

Referenced by llvm::CompileUnit::getOrCreateSubprogramDIE().

StringRef llvm::DISubprogram::getDisplayName ( ) const
inline

Definition at line 438 of file DebugInfo.h.

References llvm::DIDescriptor::getStringField().

unsigned llvm::DISubprogram::getFlags ( ) const
inline

Definition at line 453 of file DebugInfo.h.

References llvm::DIDescriptor::getUnsignedField().

Function* llvm::DISubprogram::getFunction ( ) const
inline

Definition at line 482 of file DebugInfo.h.

References llvm::DIDescriptor::getFunctionField().

Referenced by fixupSubprogramName().

DISubprogram llvm::DISubprogram::getFunctionDeclaration ( ) const
inline

Definition at line 485 of file DebugInfo.h.

Referenced by llvm::CompileUnit::getOrCreateSubprogramDIE().

unsigned llvm::DISubprogram::getLineNumber ( ) const
inline
StringRef llvm::DISubprogram::getLinkageName ( ) const
inline
StringRef llvm::DISubprogram::getName ( ) const
inline
unsigned llvm::DISubprogram::getScopeLineNumber ( ) const
inline

getScopeLineNumber - Get the beginning of the scope of the function, not necessarily where the name of the program starts.

Definition at line 494 of file DebugInfo.h.

References llvm::DIDescriptor::getUnsignedField().

Referenced by getFnDebugLoc().

DIArray llvm::DISubprogram::getTemplateParams ( ) const
inline

Definition at line 484 of file DebugInfo.h.

Referenced by llvm::CompileUnit::getOrCreateSubprogramDIE().

DICompositeType llvm::DISubprogram::getType ( ) const
inline
DIArray DISubprogram::getVariables ( ) const

Definition at line 728 of file DebugInfo.cpp.

References getNodeField().

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

MDNode * DISubprogram::getVariablesNodes ( ) const

Definition at line 724 of file DebugInfo.cpp.

References getNodeField().

unsigned llvm::DISubprogram::getVirtualIndex ( ) const
inline
unsigned llvm::DISubprogram::getVirtuality ( ) const
inline
unsigned llvm::DISubprogram::isArtificial ( ) const
inline
unsigned llvm::DISubprogram::isDefinition ( ) const
inline
bool llvm::DISubprogram::isExplicit ( ) const
inline

isExplicit - Return true if this subprogram is marked as explicit.

Definition at line 467 of file DebugInfo.h.

References llvm::DIDescriptor::FlagExplicit, and llvm::DIDescriptor::getUnsignedField().

unsigned llvm::DISubprogram::isLocalToUnit ( ) const
inline

isLocalToUnit - Return true if this subprogram is local to the current compile unit, like 'static' in C.

Definition at line 445 of file DebugInfo.h.

References llvm::DIDescriptor::getUnsignedField().

Referenced by llvm::CompileUnit::getOrCreateSubprogramDIE().

unsigned DISubprogram::isOptimized ( ) const

Definition at line 717 of file DebugInfo.cpp.

Referenced by llvm::CompileUnit::getOrCreateSubprogramDIE().

bool llvm::DISubprogram::isPrivate ( ) const
inline

isPrivate - Return true if this subprogram has "private" access specifier.

Definition at line 460 of file DebugInfo.h.

References llvm::DIDescriptor::FlagPrivate, and llvm::DIDescriptor::getUnsignedField().

bool llvm::DISubprogram::isProtected ( ) const
inline

isProtected - Return true if this subprogram has "protected" access specifier.

Definition at line 463 of file DebugInfo.h.

References llvm::DIDescriptor::FlagProtected, and llvm::DIDescriptor::getUnsignedField().

bool llvm::DISubprogram::isPrototyped ( ) const
inline

isPrototyped - Return true if this subprogram is prototyped.

Definition at line 469 of file DebugInfo.h.

References llvm::DIDescriptor::FlagPrototyped, and llvm::DIDescriptor::getUnsignedField().

Referenced by llvm::CompileUnit::getOrCreateSubprogramDIE().

void llvm::DISubprogram::replaceFunction ( Function F)
inline

Definition at line 483 of file DebugInfo.h.

References llvm::DIDescriptor::replaceFunctionField().

bool DISubprogram::Verify ( ) const

Verify - Verify that a subprogram descriptor is well formed.

Definition at line 512 of file DebugInfo.cpp.

References fieldIsMDNode(), fieldIsScopeRef(), and fieldIsTypeRef().

Referenced by llvm::DIDescriptor::Verify().

Friends And Related Function Documentation

friend class DIDescriptor
friend

Definition at line 430 of file DebugInfo.h.


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