本文整理汇总了C++中DIScope::isType方法的典型用法代码示例。如果您正苦于以下问题:C++ DIScope::isType方法的具体用法?C++ DIScope::isType怎么用?C++ DIScope::isType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIScope
的用法示例。
在下文中一共展示了DIScope::isType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processScope
void DebugInfoFinder::processScope(DIScope Scope) {
if (Scope.isType()) {
DIType Ty(Scope);
processType(Ty);
return;
}
if (Scope.isCompileUnit()) {
addCompileUnit(DICompileUnit(Scope));
return;
}
if (Scope.isSubprogram()) {
processSubprogram(DISubprogram(Scope));
return;
}
if (!addScope(Scope))
return;
if (Scope.isLexicalBlock()) {
DILexicalBlock LB(Scope);
processScope(LB.getContext());
} else if (Scope.isLexicalBlockFile()) {
DILexicalBlockFile LBF = DILexicalBlockFile(Scope);
processScope(LBF.getScope());
} else if (Scope.isNameSpace()) {
DINameSpace NS(Scope);
processScope(NS.getContext());
}
}
示例2: ShowContext
void DIEItem::ShowContext(DetailsView* detailsView, DIScope scope) {
// TODO: Fill out these cases.
if (scope.isCompileUnit()) {
DICompileUnit diCompileUnit(scope);
detailsView->Add(_("ContextType"), _("DICompileUnit"));
detailsView->Add(_("Context"),
toWxStr(diCompileUnit.getDirectory()) + _("/") +
toWxStr(diCompileUnit.getFilename()));
} else if (scope.isFile()) {
DIFile diFile(scope);
detailsView->Add(_("ContextType"), _("DIFile"));
detailsView->Add(_("Context"),
toWxStr(diFile.getDirectory()) + _("/") +
toWxStr(diFile.getFilename()));
} else if (scope.isNameSpace()) {
DINameSpace diNameSpace(scope);
detailsView->Add(_("ContextType"), _("DINameSpace"));
detailsView->Add(_("Context"), diNameSpace.getName());
} else if (scope.isSubprogram()) {
DISubprogram diSubprogram(scope);
detailsView->Add(_("ContextType"), _("DISubprogram"));
detailsView->Add(_("Context"), diSubprogram.getName());
} else if (scope.isLexicalBlock()) {
detailsView->Add(_("ContextType"), _("DILexicalBlock"));
// TODO: Implement context name.
detailsView->Add(_("Context"), _("?{}"));
} else if (scope.isType()) {
detailsView->Add(_("ContextType"), _("DIType"));
detailsView->Add(_("Context"), DITypeToString(DIType(scope)));
} else {
detailsView->Add(_("Context"), _("??? [Unknown]"));
}
}