本文整理汇总了C++中DWARFDIE::GetDWOContext方法的典型用法代码示例。如果您正苦于以下问题:C++ DWARFDIE::GetDWOContext方法的具体用法?C++ DWARFDIE::GetDWOContext怎么用?C++ DWARFDIE::GetDWOContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DWARFDIE
的用法示例。
在下文中一共展示了DWARFDIE::GetDWOContext方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Tag
void
DWARFDIE::GetDWOContext (std::vector<CompilerContext> &context) const
{
const dw_tag_t tag = Tag();
if (tag == DW_TAG_compile_unit)
return;
DWARFDIE parent = GetParent();
if (parent)
parent.GetDWOContext(context);
switch (tag)
{
case DW_TAG_module:
context.push_back(CompilerContext(CompilerContextKind::Module, ConstString(GetName())));
break;
case DW_TAG_namespace:
context.push_back(CompilerContext(CompilerContextKind::Namespace, ConstString(GetName())));
break;
case DW_TAG_structure_type:
context.push_back(CompilerContext(CompilerContextKind::Structure, ConstString(GetName())));
break;
case DW_TAG_union_type:
context.push_back(CompilerContext(CompilerContextKind::Union, ConstString(GetName())));
break;
case DW_TAG_class_type:
context.push_back(CompilerContext(CompilerContextKind::Class, ConstString(GetName())));
break;
case DW_TAG_enumeration_type:
context.push_back(CompilerContext(CompilerContextKind::Enumeration, ConstString(GetName())));
break;
case DW_TAG_subprogram:
context.push_back(CompilerContext(CompilerContextKind::Function, ConstString(GetPubname())));
break;
case DW_TAG_variable:
context.push_back(CompilerContext(CompilerContextKind::Variable, ConstString(GetPubname())));
break;
case DW_TAG_typedef:
context.push_back(CompilerContext(CompilerContextKind::Typedef, ConstString(GetName())));
break;
default:
break;
}
}