LLVM API Documentation
#include <DebugInfo.h>
Public Member Functions | |
| DIDescriptor () | |
| DIDescriptor (GlobalVariable *GV) | |
| bool | isNull () const |
| GlobalVariable * | getGV () const |
| unsigned | getVersion () const |
| unsigned | getTag () const |
| void | dump () const |
| dump - print descriptor. | |
Static Public Member Functions | |
| static bool | ValidDebugInfo (Value *V, CodeGenOpt::Level OptLevel) |
| ValidDebugInfo - Return true if V represents valid debug info value. | |
Protected Member Functions | |
| DIDescriptor (GlobalVariable *GV, unsigned RequiredTag) | |
| const std::string & | getStringField (unsigned Elt, std::string &Result) const |
| unsigned | getUnsignedField (unsigned Elt) const |
| uint64_t | getUInt64Field (unsigned Elt) const |
| DIDescriptor | getDescriptorField (unsigned Elt) const |
| template<typename DescTy> | |
| DescTy | getFieldAs (unsigned Elt) const |
| GlobalVariable * | getGlobalVariableField (unsigned Elt) const |
Protected Attributes | |
| GlobalVariable * | DbgGV |
Definition at line 45 of file DebugInfo.h.
| DIDescriptor::DIDescriptor | ( | GlobalVariable * | GV, | |
| unsigned | RequiredTag | |||
| ) | [protected] |
DIDescriptor constructor. If the specified GV is non-null, this checks to make sure that the tag in the descriptor matches 'RequiredTag'. If not, the debug info is corrupt and we ignore it.
Definition at line 78 of file DebugInfo.cpp.
| llvm::DIDescriptor::DIDescriptor | ( | ) | [inline, explicit] |
| llvm::DIDescriptor::DIDescriptor | ( | GlobalVariable * | GV | ) | [inline, explicit] |
Definition at line 70 of file DebugInfo.h.
| const std::string & DIDescriptor::getStringField | ( | unsigned | Elt, | |
| std::string & | Result | |||
| ) | const [protected] |
Definition at line 87 of file DebugInfo.cpp.
References llvm::CallingConv::C, DbgGV, llvm::GetConstantStringInfo(), llvm::GlobalVariable::getInitializer(), llvm::User::getNumOperands(), and llvm::Constant::getOperand().
Referenced by llvm::DICompileUnit::getDirectory(), llvm::DIGlobal::getDisplayName(), llvm::DICompileUnit::getFilename(), llvm::DICompileUnit::getFlags(), llvm::DIGlobal::getLinkageName(), llvm::DIEnumerator::getName(), llvm::DIVariable::getName(), llvm::DIGlobal::getName(), llvm::DIType::getName(), and llvm::DICompileUnit::getProducer().
Definition at line 55 of file DebugInfo.h.
References getUInt64Field().
Referenced by llvm::DIBasicType::getEncoding(), llvm::DIType::getFlags(), llvm::DICompileUnit::getLanguage(), llvm::DIType::getLineNumber(), llvm::DIGlobal::getLineNumber(), llvm::DIVariable::getLineNumber(), llvm::DICompositeType::getRunTimeLang(), llvm::DICompileUnit::getRunTimeVersion(), getTag(), getVersion(), llvm::DIGlobal::isDefinition(), llvm::DIGlobal::isLocalToUnit(), llvm::DICompileUnit::isMain(), and llvm::DICompileUnit::isOptimized().
| uint64_t DIDescriptor::getUInt64Field | ( | unsigned | Elt | ) | const [protected] |
Definition at line 106 of file DebugInfo.cpp.
References llvm::CallingConv::C, DbgGV, llvm::GlobalVariable::getInitializer(), llvm::User::getNumOperands(), llvm::Constant::getOperand(), and llvm::GlobalVariable::hasInitializer().
Referenced by llvm::DIType::getAlignInBits(), llvm::DIEnumerator::getEnumValue(), llvm::DISubrange::getHi(), llvm::DISubrange::getLo(), llvm::DIType::getOffsetInBits(), llvm::DIType::getSizeInBits(), and getUnsignedField().
| DIDescriptor DIDescriptor::getDescriptorField | ( | unsigned | Elt | ) | const [protected] |
Definition at line 119 of file DebugInfo.cpp.
References llvm::CallingConv::C, DbgGV, DIDescriptor(), llvm::GlobalVariable::getInitializer(), llvm::User::getNumOperands(), llvm::Constant::getOperand(), and llvm::Value::stripPointerCasts().
Referenced by llvm::DIBlock::getContext(), llvm::DIVariable::getContext(), llvm::DIType::getContext(), llvm::DIGlobal::getContext(), llvm::DIArray::getElement(), and getFieldAs().
| DescTy llvm::DIDescriptor::getFieldAs | ( | unsigned | Elt | ) | const [inline, protected] |
| GlobalVariable * DIDescriptor::getGlobalVariableField | ( | unsigned | Elt | ) | const [protected] |
Definition at line 130 of file DebugInfo.cpp.
References llvm::CallingConv::C, DbgGV, llvm::dyn_cast(), llvm::GlobalVariable::getInitializer(), llvm::User::getNumOperands(), llvm::Constant::getOperand(), and llvm::Value::stripPointerCasts().
Referenced by llvm::DIGlobalVariable::getGlobal().
| bool llvm::DIDescriptor::isNull | ( | ) | const [inline] |
Definition at line 72 of file DebugInfo.h.
References DbgGV.
Referenced by llvm::DICompositeType::dump(), llvm::DIType::dump(), findFnRegionEndMarker(), llvm::DIFactory::GetOrCreateSubrange(), llvm::DISubprogram::getReturnTypeName(), llvm::isInlinedFnEnd(), llvm::DwarfDebug::RecordVariableScope(), llvm::DIDerivedType::replaceAllUsesWith(), llvm::DIVariable::Verify(), llvm::DIGlobalVariable::Verify(), llvm::DISubprogram::Verify(), llvm::DICompositeType::Verify(), llvm::DIType::Verify(), and llvm::DICompileUnit::Verify().
| GlobalVariable* llvm::DIDescriptor::getGV | ( | ) | const [inline] |
Definition at line 74 of file DebugInfo.h.
References DbgGV.
Referenced by llvm::ExtractDebugLocation(), findFnRegionEndMarker(), getFieldAs(), llvm::DIFactory::GetOrCreateSubrange(), llvm::DISubprogram::getReturnTypeName(), llvm::DwarfDebug::RecordInlinedFnEnd(), llvm::DwarfDebug::RecordInlinedFnStart(), llvm::DwarfDebug::RecordVariable(), llvm::DwarfDebug::RecordVariableScope(), and llvm::DIDerivedType::replaceAllUsesWith().
| unsigned llvm::DIDescriptor::getVersion | ( | ) | const [inline] |
Definition at line 76 of file DebugInfo.h.
References getUnsignedField(), and llvm::LLVMDebugVersionMask.
Referenced by ValidDebugInfo().
| unsigned llvm::DIDescriptor::getTag | ( | ) | const [inline] |
Definition at line 80 of file DebugInfo.h.
References getUnsignedField(), and llvm::LLVMDebugVersionMask.
Referenced by llvm::DICompositeType::DICompositeType(), llvm::DIDerivedType::DIDerivedType(), DIDescriptor(), llvm::DIType::DIType(), llvm::DIVariable::DIVariable(), llvm::DIType::dump(), llvm::DIGlobal::dump(), dump(), llvm::DIDerivedType::getOriginalTypeSize(), llvm::DwarfDebug::RecordVariable(), and ValidDebugInfo().
| bool DIDescriptor::ValidDebugInfo | ( | Value * | V, | |
| CodeGenOpt::Level | OptLevel | |||
| ) | [static] |
ValidDebugInfo - Return true if V represents valid debug info value.
Definition at line 36 of file DebugInfo.cpp.
References llvm::dwarf::DW_TAG_compile_unit, llvm::dwarf::DW_TAG_lexical_block, llvm::dwarf::DW_TAG_subprogram, llvm::dwarf::DW_TAG_variable, llvm::dyn_cast(), getTag(), getVersion(), GV, llvm::GlobalValue::hasInternalLinkage(), llvm::GlobalValue::hasLinkOnceLinkage(), llvm::LLVMDebugVersion, llvm::LLVMDebugVersion6, llvm::CodeGenOpt::None, and llvm::Value::stripPointerCasts().
Referenced by llvm::isValidDebugInfoIntrinsic().
| void DIDescriptor::dump | ( | ) | const |
dump - print descriptor.
dump - Print descriptor.
Reimplemented in llvm::DICompileUnit, llvm::DIType, llvm::DIBasicType, llvm::DIDerivedType, llvm::DICompositeType, llvm::DIGlobal, llvm::DISubprogram, llvm::DIGlobalVariable, and llvm::DIVariable.
Definition at line 344 of file DebugInfo.cpp.
References llvm::cerr(), DbgGV, getTag(), and llvm::dwarf::TagString().
Referenced by llvm::DbgScope::dump().
GlobalVariable* llvm::DIDescriptor::DbgGV [protected] |
Definition at line 47 of file DebugInfo.h.
Referenced by llvm::DICompositeType::DICompositeType(), llvm::DIDerivedType::DIDerivedType(), DIDescriptor(), llvm::DIType::DIType(), llvm::DIVariable::DIVariable(), llvm::DIType::dump(), llvm::DIGlobal::dump(), dump(), getDescriptorField(), getGlobalVariableField(), getGV(), llvm::DIArray::getNumElements(), getStringField(), getUInt64Field(), and isNull().