本文整理汇总了C++中DISubprogram::getContext方法的典型用法代码示例。如果您正苦于以下问题:C++ DISubprogram::getContext方法的具体用法?C++ DISubprogram::getContext怎么用?C++ DISubprogram::getContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DISubprogram
的用法示例。
在下文中一共展示了DISubprogram::getContext方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processSubprogram
void DebugInfoFinder::processSubprogram(DISubprogram SP) {
if (!addSubprogram(SP))
return;
processScope(SP.getContext().resolve(TypeIdentifierMap));
processType(SP.getType());
for (auto *Element : SP.getTemplateParams()) {
if (DITemplateTypeParameter TType =
dyn_cast<MDTemplateTypeParameter>(Element)) {
processType(TType.getType().resolve(TypeIdentifierMap));
} else if (DITemplateValueParameter TVal =
dyn_cast<MDTemplateValueParameter>(Element)) {
processType(TVal.getType().resolve(TypeIdentifierMap));
}
}
}
示例2: addSourceLine
/// addSourceLine - Add location information to specified debug information
/// entry.
void CompileUnit::addSourceLine(DIE *Die, DISubprogram SP) {
// Verify subprogram.
if (!SP.Verify())
return;
// If the line number is 0, don't add it.
if (SP.getLineNumber() == 0)
return;
unsigned Line = SP.getLineNumber();
if (!SP.getContext().Verify())
return;
unsigned FileID = DD->GetOrCreateSourceID(SP.getFilename(), SP.getDirectory());
assert(FileID && "Invalid file id");
addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
}
示例3: processSubprogram
void DebugInfoFinder::processSubprogram(DISubprogram SP) {
if (!addSubprogram(SP))
return;
processScope(SP.getContext().resolve(TypeIdentifierMap));
processType(SP.getType());
DIArray TParams = SP.getTemplateParams();
for (unsigned I = 0, E = TParams.getNumElements(); I != E; ++I) {
DIDescriptor Element = TParams.getElement(I);
if (Element.isTemplateTypeParameter()) {
DITemplateTypeParameter TType(Element);
processType(TType.getType().resolve(TypeIdentifierMap));
} else if (Element.isTemplateValueParameter()) {
DITemplateValueParameter TVal(Element);
processType(TVal.getType().resolve(TypeIdentifierMap));
}
}
}
示例4: processSubprogram
/// processSubprogram - Process DISubprogram.
void DebugInfoFinder::processSubprogram(DISubprogram SP) {
if (!addSubprogram(SP))
return;
processScope(SP.getContext());
processType(SP.getType());
}