LLVM API Documentation
#include <DebugInfo.h>
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, FlagIndirectVariable = 1 << 13 } |
Public Member Functions | |
DIDescriptor (const MDNode *N=0) | |
bool | Verify () const |
operator MDNode * () const | |
MDNode * | operator-> () 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... | |
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 |
GlobalVariable * | getGlobalVariableField (unsigned Elt) const |
Constant * | getConstantField (unsigned Elt) const |
Function * | getFunctionField (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 | |
const MDNode * | DbgNode |
Friends | |
template<typename T > | |
class | DIRef |
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 60 of file DebugInfo.h.
anonymous enum |
Definition at line 66 of file DebugInfo.h.
|
inlineexplicit |
Definition at line 104 of file DebugInfo.h.
void DIDescriptor::dump | ( | ) | const |
dump - print descriptor to dbgs() with a newline.
dump - Print descriptor to dbgs() with a newline.
Definition at line 1195 of file DebugInfo.cpp.
References llvm::dbgs().
Definition at line 111 of file DebugInfo.cpp.
Referenced by llvm::DIDerivedType::getConstant(), and llvm::DIGlobalVariable::getConstant().
|
protected |
Definition at line 97 of file DebugInfo.cpp.
References llvm::tgtok::Field, and getNodeField().
Referenced by llvm::DIArray::getElement(), and getFieldAs().
|
inlineprotected |
Definition at line 94 of file DebugInfo.h.
References getDescriptorField().
|
protected |
Specialize getFieldAs to handle fields that are references to DIScopes.
Specialize getFieldAs to handle fields that are references to DITypes.
|
protected |
Specialize getFieldAs to handle fields that are references to DIScopes.
Definition at line 1422 of file DebugInfo.cpp.
References getField().
Specialize getFieldAs to handle fields that are references to DITypes.
Definition at line 1426 of file DebugInfo.cpp.
References getField().
Definition at line 120 of file DebugInfo.cpp.
Referenced by llvm::DISubprogram::getFunction().
|
protected |
Definition at line 102 of file DebugInfo.cpp.
Referenced by llvm::DIGlobalVariable::getGlobal().
|
protected |
Definition at line 85 of file DebugInfo.cpp.
Referenced by llvm::DISubrange::getCount(), llvm::DIEnumerator::getEnumValue(), and llvm::DISubrange::getLo().
Definition at line 69 of file DebugInfo.cpp.
References getStringField().
Referenced by llvm::DISubprogram::getDisplayName(), llvm::DIGlobalVariable::getDisplayName(), llvm::DICompileUnit::getFlags(), llvm::DISubprogram::getLinkageName(), llvm::DIGlobalVariable::getLinkageName(), llvm::DIEnumerator::getName(), llvm::DIType::getName(), llvm::DISubprogram::getName(), llvm::DINameSpace::getName(), llvm::DITemplateTypeParameter::getName(), llvm::DITemplateValueParameter::getName(), llvm::DIGlobalVariable::getName(), llvm::DIVariable::getName(), llvm::DIImportedEntity::getName(), llvm::DIObjCProperty::getObjCPropertyGetterName(), llvm::DIObjCProperty::getObjCPropertyName(), llvm::DIObjCProperty::getObjCPropertySetterName(), llvm::DICompileUnit::getProducer(), and llvm::DICompileUnit::getSplitDebugFilename().
|
inline |
Definition at line 121 of file DebugInfo.h.
References getUnsignedField().
Referenced by llvm::CompileUnit::addBlockByrefAddress(), llvm::CompileUnit::addPubTypes(), llvm::DwarfDebug::beginFunction(), llvm::DIBuilder::createFunction(), llvm::CompileUnit::createGlobalVariableDIE(), llvm::DIBuilder::createMethod(), getBaseTypeSize(), llvm::DIDerivedType::getClassType(), llvm::DIDerivedType::getConstant(), llvm::CompileUnit::getOrCreateSubprogramDIE(), llvm::CompileUnit::getOrCreateTypeDIE(), llvm::DbgVariable::getTag(), llvm::DbgVariable::getType(), shouldCreateTypeUnit(), and llvm::WriteMDNodeComment().
|
protected |
Definition at line 73 of file DebugInfo.cpp.
Referenced by llvm::DIVariable::getAddrElement(), llvm::DIType::getAlignInBits(), llvm::DIType::getOffsetInBits(), llvm::DIType::getSizeInBits(), and getUnsignedField().
Definition at line 87 of file DebugInfo.h.
References getUInt64Field().
Referenced by llvm::DIVariable::getArgNumber(), llvm::DILexicalBlock::getColumnNumber(), llvm::DITemplateTypeParameter::getColumnNumber(), llvm::DITemplateValueParameter::getColumnNumber(), llvm::DILocation::getColumnNumber(), llvm::DIBasicType::getEncoding(), llvm::DIType::getFlags(), llvm::DISubprogram::getFlags(), llvm::DICompileUnit::getLanguage(), llvm::DIType::getLineNumber(), llvm::DISubprogram::getLineNumber(), llvm::DILexicalBlock::getLineNumber(), llvm::DINameSpace::getLineNumber(), llvm::DITemplateTypeParameter::getLineNumber(), llvm::DITemplateValueParameter::getLineNumber(), llvm::DIGlobalVariable::getLineNumber(), llvm::DIVariable::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::DIVariable::isIndirect(), llvm::DISubprogram::isLocalToUnit(), llvm::DIGlobalVariable::isLocalToUnit(), llvm::DIObjCProperty::isNonAtomicObjCProperty(), llvm::DIVariable::isObjectPointer(), llvm::DICompileUnit::isOptimized(), llvm::DISubprogram::isPrivate(), llvm::DISubprogram::isProtected(), llvm::DISubprogram::isPrototyped(), llvm::DIObjCProperty::isReadOnlyObjCProperty(), llvm::DIObjCProperty::isReadWriteObjCProperty(), and llvm::DIObjCProperty::isRetainObjCProperty().
bool DIDescriptor::isBasicType | ( | ) | const |
isBasicType - Return true if the specified tag is legal for DIBasicType.
Definition at line 152 of file DebugInfo.cpp.
Referenced by llvm::CompileUnit::getOrCreateTypeDIE(), isTypeSigned(), and isUnsignedDIType().
bool DIDescriptor::isCompileUnit | ( | ) | const |
isCompileUnit - Return true if the specified tag is DW_TAG_compile_unit.
Definition at line 275 of file DebugInfo.cpp.
Referenced by llvm::CompileUnit::addGlobalType(), llvm::CompileUnit::createGlobalVariableDIE(), and llvm::CompileUnit::getParentContextString().
bool DIDescriptor::isCompositeType | ( | ) | const |
isCompositeType - Return true if the specified tag is legal for DICompositeType.
Definition at line 189 of file DebugInfo.cpp.
Referenced by llvm::DIBuilder::createClassType(), llvm::DIBuilder::createForwardDecl(), llvm::DIBuilder::createStructType(), llvm::getDICompositeType(), and llvm::CompileUnit::getOrCreateTypeDIE().
bool DIDescriptor::isDerivedType | ( | ) | const |
isDerivedType - Return true if the specified tag is legal for DIDerivedType.
Definition at line 165 of file DebugInfo.cpp.
Referenced by getBaseTypeSize(), llvm::getDICompositeType(), llvm::CompileUnit::getOrCreateTypeDIE(), isTypeSigned(), and isUnsignedDIType().
bool DIDescriptor::isEnumerator | ( | ) | const |
isEnumerator - Return true if the specified tag is DW_TAG_enumerator.
Definition at line 308 of file DebugInfo.cpp.
bool DIDescriptor::isFile | ( | ) | const |
isFile - Return true if the specified tag is DW_TAG_file_type.
Definition at line 280 of file DebugInfo.cpp.
Referenced by llvm::CompileUnit::addGlobalType(), llvm::CompileUnit::createGlobalVariableDIE(), and llvm::CompileUnit::getOrCreateContextDIE().
bool DIDescriptor::isGlobalVariable | ( | ) | const |
isGlobalVariable - Return true if the specified tag is legal for DIGlobalVariable.
Definition at line 231 of file DebugInfo.cpp.
Referenced by llvm::CompileUnit::addSourceLine(), and llvm::CompileUnit::createGlobalVariableDIE().
bool DIDescriptor::isImportedEntity | ( | ) | const |
Return true if the specified tag is DW_TAG_imported_module or DW_TAG_imported_declaration.
Definition at line 319 of file DebugInfo.cpp.
bool DIDescriptor::isLexicalBlock | ( | ) | const |
isLexicalBlock - Return true if the specified tag is DW_TAG_lexical_block.
Definition at line 297 of file DebugInfo.cpp.
Referenced by llvm::getDISubprogram().
bool DIDescriptor::isLexicalBlockFile | ( | ) | const |
isLexicalBlockFile - Return true if the specified descriptor is a lexical block with an extra file.
Definition at line 291 of file DebugInfo.cpp.
Referenced by llvm::LexicalScopes::findLexicalScope(), and llvm::getDISubprogram().
bool DIDescriptor::isNameSpace | ( | ) | const |
isNameSpace - Return true if the specified tag is DW_TAG_namespace.
Definition at line 285 of file DebugInfo.cpp.
Referenced by llvm::CompileUnit::addGlobalType(), and llvm::CompileUnit::getOrCreateContextDIE().
bool DIDescriptor::isObjCProperty | ( | ) | const |
isObjCProperty - Return true if the specified tag is DW_TAG_APPLE_property.
Definition at line 313 of file DebugInfo.cpp.
Referenced by llvm::CompileUnit::addSourceLine().
bool DIDescriptor::isScope | ( | ) | const |
isScope - Return true if the specified tag is one of the scope related tag.
Definition at line 244 of file DebugInfo.cpp.
References llvm::dwarf::isType().
Referenced by llvm::DIBuilder::createClassType(), llvm::DIBuilder::createLocalVariable(), isScopeRef(), and printDebugLoc().
bool DIDescriptor::isSubprogram | ( | ) | const |
isSubprogram - Return true if the specified tag is legal for DISubprogram.
Definition at line 225 of file DebugInfo.cpp.
Referenced by llvm::CompileUnit::addSourceLine(), llvm::DIBuilder::createFunction(), llvm::DIBuilder::createMethod(), emitDebugValueComment(), llvm::DwarfDebug::endFunction(), llvm::DILexicalBlockFile::getContext(), llvm::getDISubprogram(), getFnDebugLoc(), llvm::CompileUnit::getOrCreateContextDIE(), llvm::CompileUnit::getOrCreateSubprogramDIE(), isShareableAcrossCUs(), llvm::DwarfDebug::isSubprogramContext(), and isTypeUnitScoped().
bool DIDescriptor::isSubrange | ( | ) | const |
isSubrange - Return true if the specified tag is DW_TAG_subrange_type.
Definition at line 303 of file DebugInfo.cpp.
bool DIDescriptor::isTemplateTypeParameter | ( | ) | const |
isTemplateTypeParameter - Return true if the specified tag is DW_TAG_template_type_parameter.
Definition at line 262 of file DebugInfo.cpp.
Referenced by llvm::CompileUnit::addTemplateParams().
bool DIDescriptor::isTemplateValueParameter | ( | ) | const |
isTemplateValueParameter - Return true if the specified tag is DW_TAG_template_value_parameter.
Definition at line 268 of file DebugInfo.cpp.
Referenced by llvm::CompileUnit::addTemplateParams().
bool DIDescriptor::isType | ( | ) | const |
isType - Return true if the specified tag is legal for DIType.
Definition at line 219 of file DebugInfo.cpp.
Referenced by llvm::CompileUnit::addSourceLine(), llvm::DIBuilder::createClassType(), llvm::DIBuilder::createFriend(), llvm::DIBuilder::createInheritance(), llvm::DIBuilder::createLocalVariable(), llvm::DIBuilder::createReferenceType(), llvm::DIBuilder::createTypedef(), llvm::CompileUnit::getOrCreateContextDIE(), llvm::CompileUnit::getOrCreateTypeDIE(), isShareableAcrossCUs(), llvm::DwarfDebug::isSubprogramContext(), isTypeRef(), llvm::DIType::isValid(), and llvm::DIRef< T >::resolve().
bool DIDescriptor::isUnspecifiedParameter | ( | ) | const |
isUnspecifiedParmeter - Return true if the specified tag is DW_TAG_unspecified_parameters.
Definition at line 238 of file DebugInfo.cpp.
bool DIDescriptor::isVariable | ( | ) | const |
isVariable - Return true if the specified tag is legal for DIVariable.
Definition at line 206 of file DebugInfo.cpp.
Referenced by llvm::CompileUnit::addSourceLine(), llvm::DwarfDebug::beginFunction(), llvm::DIBuilder::createLocalVariable(), llvm::DwarfDebug::endFunction(), llvm::DbgVariable::getNumAddrElements(), llvm::DIBuilder::insertDbgValueIntrinsic(), llvm::DIBuilder::insertDeclare(), llvm::DbgVariable::isBlockByrefVariable(), llvm::DebugInfoFinder::processDeclare(), llvm::DebugInfoFinder::processValue(), and llvm::DbgVariable::variableHasComplexAddress().
|
inline |
Definition at line 116 of file DebugInfo.h.
References DbgNode.
|
inline |
Definition at line 108 of file DebugInfo.h.
References DbgNode.
|
inline |
Definition at line 119 of file DebugInfo.h.
References operator==().
|
inline |
Definition at line 109 of file DebugInfo.h.
References DbgNode.
|
inline |
void DIDescriptor::print | ( | raw_ostream & | OS | ) | const |
print - print descriptor.
print - Print descriptor.
Definition at line 1201 of file DebugInfo.cpp.
References llvm::DIScope::printInternal(), llvm::DIType::printInternal(), and llvm::dwarf::TagString().
Referenced by llvm::WriteMDNodeComment().
Definition at line 129 of file DebugInfo.cpp.
References llvm::MDNode::replaceOperandWith().
Referenced by llvm::DISubprogram::replaceFunction().
bool DIDescriptor::Verify | ( | ) | const |
Definition at line 37 of file DebugInfo.cpp.
References llvm::DISubrange::Verify(), llvm::DIEnumerator::Verify(), llvm::DIBasicType::Verify(), llvm::DIDerivedType::Verify(), llvm::DICompositeType::Verify(), llvm::DIFile::Verify(), llvm::DICompileUnit::Verify(), llvm::DISubprogram::Verify(), llvm::DILexicalBlock::Verify(), llvm::DILexicalBlockFile::Verify(), llvm::DINameSpace::Verify(), llvm::DITemplateTypeParameter::Verify(), llvm::DITemplateValueParameter::Verify(), llvm::DIGlobalVariable::Verify(), llvm::DIVariable::Verify(), llvm::DIObjCProperty::Verify(), and llvm::DIImportedEntity::Verify().
Referenced by llvm::WriteMDNodeComment().
|
friend |
Definition at line 63 of file DebugInfo.h.
|
protected |
Definition at line 84 of file DebugInfo.h.
Referenced by llvm::DIType::isValid(), operator bool(), operator MDNode *(), operator->(), and operator==().