LLVM API Documentation

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
llvm::DIDescriptor Class Reference

#include <DebugInfo.h>

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

List of all members.

Public Types

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
}

Public Member Functions

 DIDescriptor ()
 DIDescriptor (const MDNode *N)
 DIDescriptor (const DIFile F)
 DIDescriptor (const DISubprogram F)
 DIDescriptor (const DILexicalBlockFile F)
 DIDescriptor (const DILexicalBlock F)
 DIDescriptor (const DIVariable F)
 DIDescriptor (const DIType F)
bool Verify () const
 operator MDNode * () const
MDNodeoperator-> () const
unsigned getTag () const
bool isDerivedType () const
 isDerivedType - Return true if the specified tag is legal for DIDerivedType.
bool isCompositeType () const
bool isBasicType () const
bool isVariable () const
 isVariable - Return true if the specified tag is legal for DIVariable.
bool isSubprogram () const
bool isGlobalVariable () const
bool isScope () const
bool isFile () const
 isFile - Return true if the specified tag is DW_TAG_file_type.
bool isCompileUnit () const
 isCompileUnit - Return true if the specified tag is DW_TAG_compile_unit.
bool isNameSpace () const
 isNameSpace - Return true if the specified tag is DW_TAG_namespace.
bool isLexicalBlockFile () const
bool isLexicalBlock () const
 isLexicalBlock - Return true if the specified tag is DW_TAG_lexical_block.
bool isSubrange () const
 isSubrange - Return true if the specified tag is DW_TAG_subrange_type.
bool isEnumerator () const
 isEnumerator - Return true if the specified tag is DW_TAG_enumerator.
bool isType () const
 isType - Return true if the specified tag is legal for DIType.
bool isGlobal () const
 isGlobal - Return true if the specified tag is legal for DIGlobal.
bool isUnspecifiedParameter () const
bool isTemplateTypeParameter () const
bool isTemplateValueParameter () const
bool isObjCProperty () const
 isObjCProperty - Return true if the specified tag is DW_TAG_APPLE_property.
bool isImportedEntity () const
 Return true if the specified tag is DW_TAG_imported_module or DW_TAG_imported_declaration.
void print (raw_ostream &OS) const
 print - print descriptor.
void dump () const
 dump - print descriptor to dbgs() with a newline.

Protected Member Functions

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)

Protected Attributes

const MDNodeDbgNode

Detailed Description

DIDescriptor - A thin wraper around MDNode to access encoded debug info. This should not be stored in a container, because the underlying MDNode may change in certain situations.

Definition at line 51 of file DebugInfo.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
FlagPrivate 
FlagProtected 
FlagFwdDecl 
FlagAppleBlock 
FlagBlockByrefStruct 
FlagVirtual 
FlagArtificial 
FlagExplicit 
FlagPrototyped 
FlagObjcClassComplete 
FlagObjectPointer 
FlagVector 
FlagStaticMember 

Definition at line 53 of file DebugInfo.h.


Constructor & Destructor Documentation

llvm::DIDescriptor::DIDescriptor ( ) [inline, explicit]

Definition at line 90 of file DebugInfo.h.

Referenced by getDescriptorField().

llvm::DIDescriptor::DIDescriptor ( const MDNode N) [inline, explicit]

Definition at line 91 of file DebugInfo.h.

DIDescriptor::DIDescriptor ( const DIFile  F) [explicit]

Definition at line 37 of file DebugInfo.cpp.

DIDescriptor::DIDescriptor ( const DISubprogram  F) [explicit]

Definition at line 40 of file DebugInfo.cpp.

DIDescriptor::DIDescriptor ( const DILexicalBlockFile  F) [explicit]

Definition at line 43 of file DebugInfo.cpp.

DIDescriptor::DIDescriptor ( const DILexicalBlock  F) [explicit]

Definition at line 46 of file DebugInfo.cpp.

DIDescriptor::DIDescriptor ( const DIVariable  F) [explicit]

Definition at line 49 of file DebugInfo.cpp.

DIDescriptor::DIDescriptor ( const DIType  F) [explicit]

Definition at line 52 of file DebugInfo.cpp.


Member Function Documentation

void DIDescriptor::dump ( ) const

dump - print descriptor to dbgs() with a newline.

dump - Print descriptor to dbgs() with a newline.

Definition at line 1038 of file DebugInfo.cpp.

References llvm::dbgs(), and print().

Constant * DIDescriptor::getConstantField ( unsigned  Elt) const [protected]
DIDescriptor DIDescriptor::getDescriptorField ( unsigned  Elt) const [protected]

Definition at line 117 of file DebugInfo.cpp.

References DbgNode, DIDescriptor(), and llvm::MDNode::getOperand().

Referenced by llvm::DIArray::getElement(), and getFieldAs().

template<typename DescTy >
DescTy llvm::DIDescriptor::getFieldAs ( unsigned  Elt) const [inline, protected]

Definition at line 80 of file DebugInfo.h.

References getDescriptorField().

Function * DIDescriptor::getFunctionField ( unsigned  Elt) const [protected]

Definition at line 145 of file DebugInfo.cpp.

References DbgNode, and llvm::MDNode::getOperand().

Referenced by llvm::DISubprogram::getFunction().

GlobalVariable * DIDescriptor::getGlobalVariableField ( unsigned  Elt) const [protected]

Definition at line 127 of file DebugInfo.cpp.

References DbgNode, and llvm::MDNode::getOperand().

Referenced by llvm::DIGlobalVariable::getGlobal().

int64_t DIDescriptor::getInt64Field ( unsigned  Elt) const [protected]

Definition at line 105 of file DebugInfo.cpp.

References DbgNode, and llvm::MDNode::getOperand().

Referenced by llvm::DISubrange::getCount(), and llvm::DISubrange::getLo().

StringRef DIDescriptor::getStringField ( unsigned  Elt) const [protected]
unsigned llvm::DIDescriptor::getTag ( ) const [inline]
uint64_t DIDescriptor::getUInt64Field ( unsigned  Elt) const [protected]
unsigned llvm::DIDescriptor::getUnsignedField ( unsigned  Elt) const [inline, protected]

Definition at line 72 of file DebugInfo.h.

References getUInt64Field().

Referenced by llvm::DIVariable::getArgNumber(), llvm::DITemplateTypeParameter::getColumnNumber(), llvm::DITemplateValueParameter::getColumnNumber(), llvm::DILexicalBlock::getColumnNumber(), llvm::DILocation::getColumnNumber(), llvm::DIBasicType::getEncoding(), llvm::DIType::getFlags(), llvm::DISubprogram::getFlags(), llvm::DICompileUnit::getLanguage(), llvm::DIType::getLineNumber(), llvm::DITemplateTypeParameter::getLineNumber(), llvm::DITemplateValueParameter::getLineNumber(), llvm::DISubprogram::getLineNumber(), llvm::DIGlobalVariable::getLineNumber(), llvm::DIVariable::getLineNumber(), llvm::DILexicalBlock::getLineNumber(), llvm::DINameSpace::getLineNumber(), llvm::DILocation::getLineNumber(), llvm::DIObjCProperty::getLineNumber(), llvm::DIImportedEntity::getLineNumber(), llvm::DICompositeType::getRunTimeLang(), llvm::DICompileUnit::getRunTimeVersion(), llvm::DISubprogram::getScopeLineNumber(), getTag(), llvm::DISubprogram::getVirtualIndex(), llvm::DISubprogram::getVirtuality(), llvm::DISubprogram::isArtificial(), llvm::DIVariable::isArtificial(), llvm::DIObjCProperty::isAssignObjCProperty(), llvm::DIObjCProperty::isCopyObjCProperty(), llvm::DISubprogram::isDefinition(), llvm::DIGlobalVariable::isDefinition(), llvm::DISubprogram::isExplicit(), llvm::DISubprogram::isLocalToUnit(), llvm::DIGlobalVariable::isLocalToUnit(), llvm::DIObjCProperty::isNonAtomicObjCProperty(), llvm::DIVariable::isObjectPointer(), llvm::DICompileUnit::isOptimized(), llvm::DISubprogram::isOptimized(), llvm::DISubprogram::isPrivate(), llvm::DISubprogram::isProtected(), llvm::DISubprogram::isPrototyped(), llvm::DIObjCProperty::isReadOnlyObjCProperty(), llvm::DIObjCProperty::isReadWriteObjCProperty(), and llvm::DIObjCProperty::isRetainObjCProperty().

bool DIDescriptor::isBasicType ( ) const
bool DIDescriptor::isCompileUnit ( ) const

isCompileUnit - Return true if the specified tag is DW_TAG_compile_unit.

Definition at line 299 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_compile_unit, and getTag().

Referenced by llvm::CompileUnit::addGlobalType(), llvm::CompileUnit::createGlobalVariableDIE(), print(), and llvm::DICompileUnit::Verify().

bool DIDescriptor::isCompositeType ( ) const
bool DIDescriptor::isDerivedType ( ) const
bool DIDescriptor::isEnumerator ( ) const

isEnumerator - Return true if the specified tag is DW_TAG_enumerator.

Definition at line 332 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_enumerator, and getTag().

Referenced by print(), and llvm::DIEnumerator::Verify().

bool DIDescriptor::isFile ( ) const

isFile - Return true if the specified tag is DW_TAG_file_type.

Definition at line 304 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_file_type, and getTag().

Referenced by llvm::CompileUnit::addGlobalType(), llvm::CompileUnit::createGlobalVariableDIE(), llvm::DIFile::DIFile(), print(), and llvm::DIFile::Verify().

bool DIDescriptor::isGlobal ( ) const

isGlobal - Return true if the specified tag is legal for DIGlobal.

Definition at line 260 of file DebugInfo.cpp.

References isGlobalVariable().

bool DIDescriptor::isGlobalVariable ( ) const

isGlobalVariable - Return true if the specified tag is legal for DIGlobalVariable.

Definition at line 254 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_constant, llvm::dwarf::DW_TAG_variable, and getTag().

Referenced by isGlobal(), print(), and llvm::DIGlobalVariable::Verify().

bool DIDescriptor::isImportedEntity ( ) const

Return true if the specified tag is DW_TAG_imported_module or DW_TAG_imported_declaration.

Definition at line 343 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_imported_declaration, llvm::dwarf::DW_TAG_imported_module, and getTag().

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

bool DIDescriptor::isLexicalBlock ( ) const

isLexicalBlock - Return true if the specified tag is DW_TAG_lexical_block.

Definition at line 321 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_lexical_block, llvm::MDNode::getNumOperands(), and getTag().

Referenced by llvm::getDISubprogram(), and llvm::DILexicalBlock::Verify().

bool DIDescriptor::isLexicalBlockFile ( ) const

isLexicalBlockFile - Return true if the specified descriptor is a lexical block with an extra file.

Definition at line 315 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_lexical_block, llvm::MDNode::getNumOperands(), and getTag().

Referenced by llvm::LexicalScopes::findLexicalScope(), llvm::getDISubprogram(), and llvm::DILexicalBlockFile::Verify().

bool DIDescriptor::isNameSpace ( ) const

isNameSpace - Return true if the specified tag is DW_TAG_namespace.

Definition at line 309 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_namespace, and getTag().

Referenced by llvm::CompileUnit::addGlobalType(), llvm::CompileUnit::getOrCreateContextDIE(), print(), and llvm::DINameSpace::Verify().

bool DIDescriptor::isObjCProperty ( ) const

isObjCProperty - Return true if the specified tag is DW_TAG_APPLE_property.

Definition at line 337 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_APPLE_property, and getTag().

Referenced by llvm::CompileUnit::constructTypeDIE(), print(), and llvm::DIObjCProperty::Verify().

bool DIDescriptor::isScope ( ) const

isScope - Return true if the specified tag is one of the scope related tag.

Definition at line 272 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_compile_unit, llvm::dwarf::DW_TAG_lexical_block, llvm::dwarf::DW_TAG_namespace, llvm::dwarf::DW_TAG_subprogram, and getTag().

Referenced by print().

bool DIDescriptor::isSubprogram ( ) const
bool DIDescriptor::isSubrange ( ) const

isSubrange - Return true if the specified tag is DW_TAG_subrange_type.

Definition at line 327 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_subrange_type, and getTag().

Referenced by print(), and llvm::DISubrange::Verify().

bool DIDescriptor::isTemplateTypeParameter ( ) const

isTemplateTypeParameter - Return true if the specified tag is DW_TAG_template_type_parameter.

Definition at line 288 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_template_type_parameter, and getTag().

Referenced by llvm::CompileUnit::addTemplateParams(), and llvm::DITemplateTypeParameter::Verify().

bool DIDescriptor::isTemplateValueParameter ( ) const

isTemplateValueParameter - Return true if the specified tag is DW_TAG_template_value_parameter.

Definition at line 294 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_template_value_parameter, and getTag().

Referenced by llvm::CompileUnit::addTemplateParams(), and llvm::DITemplateValueParameter::Verify().

bool DIDescriptor::isType ( ) const

isType - Return true if the specified tag is legal for DIType.

Definition at line 242 of file DebugInfo.cpp.

References isBasicType(), isCompositeType(), and isDerivedType().

Referenced by llvm::CompileUnit::getOrCreateContextDIE(), llvm::isSubprogramContext(), and llvm::DIType::Verify().

bool DIDescriptor::isUnspecifiedParameter ( ) const

isUnspecifiedParmeter - Return true if the specified tag is DW_TAG_unspecified_parameters.

Definition at line 266 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_unspecified_parameters, and getTag().

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

bool DIDescriptor::isVariable ( ) const

isVariable - Return true if the specified tag is legal for DIVariable.

Definition at line 230 of file DebugInfo.cpp.

References DbgNode, llvm::dwarf::DW_TAG_arg_variable, llvm::dwarf::DW_TAG_auto_variable, and getTag().

Referenced by print(), and llvm::DIVariable::Verify().

llvm::DIDescriptor::operator MDNode * ( ) const [inline]

Definition at line 101 of file DebugInfo.h.

References DbgNode.

MDNode* llvm::DIDescriptor::operator-> ( ) const [inline]

Definition at line 102 of file DebugInfo.h.

References DbgNode.

void DIDescriptor::print ( raw_ostream OS) const
void DIDescriptor::replaceFunctionField ( unsigned  Elt,
Function F 
) [protected]

Definition at line 154 of file DebugInfo.cpp.

References DbgNode, and llvm::MDNode::replaceOperandWith().

Referenced by llvm::DISubprogram::replaceFunction().

bool DIDescriptor::Verify ( ) const

Member Data Documentation

const MDNode* llvm::DIDescriptor::DbgNode [protected]

Definition at line 69 of file DebugInfo.h.

Referenced by llvm::DICompositeType::DICompositeType(), llvm::DIFile::DIFile(), llvm::DIType::DIType(), getConstantField(), getDescriptorField(), llvm::DIScope::getDirectory(), llvm::DICompileUnit::getEnumTypes(), llvm::DIScope::getFilename(), llvm::DIFile::getFileNode(), getFunctionField(), getGlobalVariableField(), llvm::DICompileUnit::getGlobalVariables(), llvm::DICompileUnit::getImportedEntities(), llvm::DIVariable::getInlinedAt(), getInt64Field(), llvm::DIVariable::getNumAddrElements(), llvm::DIArray::getNumElements(), llvm::DIDerivedType::getObjCProperty(), llvm::DICompileUnit::getRetainedTypes(), getStringField(), llvm::DICompileUnit::getSubprograms(), getUInt64Field(), llvm::DITemplateValueParameter::getValue(), llvm::DISubprogram::getVariables(), llvm::DISubprogram::getVariablesNodes(), isBasicType(), isCompileUnit(), isCompositeType(), isDerivedType(), isEnumerator(), isFile(), isGlobalVariable(), isImportedEntity(), isLexicalBlock(), isLexicalBlockFile(), isNameSpace(), isObjCProperty(), llvm::DISubprogram::isOptimized(), isScope(), isSubprogram(), isSubrange(), isTemplateTypeParameter(), isTemplateValueParameter(), llvm::DIType::isUnsignedDIType(), isUnspecifiedParameter(), llvm::DIType::isValid(), isVariable(), operator MDNode *(), operator->(), print(), llvm::DIVariable::printExtendedName(), llvm::DIType::printInternal(), llvm::DIType::replaceAllUsesWith(), replaceFunctionField(), llvm::DICompositeType::setContainingType(), llvm::DIScope::setFilename(), llvm::DICompositeType::setTypeArray(), Verify(), llvm::DISubrange::Verify(), llvm::DIFile::Verify(), llvm::DICompileUnit::Verify(), llvm::DIEnumerator::Verify(), llvm::DIBasicType::Verify(), llvm::DIDerivedType::Verify(), llvm::DICompositeType::Verify(), llvm::DITemplateTypeParameter::Verify(), llvm::DITemplateValueParameter::Verify(), llvm::DISubprogram::Verify(), llvm::DIGlobalVariable::Verify(), llvm::DIVariable::Verify(), llvm::DILexicalBlock::Verify(), llvm::DILexicalBlockFile::Verify(), llvm::DINameSpace::Verify(), llvm::DILocation::Verify(), llvm::DIObjCProperty::Verify(), and llvm::DIImportedEntity::Verify().


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