本文整理汇总了C++中DIType::isBasicType方法的典型用法代码示例。如果您正苦于以下问题:C++ DIType::isBasicType方法的具体用法?C++ DIType::isBasicType怎么用?C++ DIType::isBasicType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIType
的用法示例。
在下文中一共展示了DIType::isBasicType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FormatDIType
void DIEItem::FormatDIType(wxTextOutputStream& out, DIType type) const {
if (type.isCompositeType()) {
DICompositeType diCompType(type);
if (!type.getName().empty()) {
out << toWxStr(type.getName());
} else {
out << _("?Implement unnamed composite");
// TODO: Implement:
// DW_TAG_array_type
// DW_TAG_enumeration_type
// DW_TAG_structure_type
// DW_TAG_union_type
// DW_TAG_vector_type
// DW_TAG_subroutine_type
// DW_TAG_inheritance
}
} else if (type.isDerivedType()) {
DIDerivedType diDerivedType(type);
DIType diBase = diDerivedType.getTypeDerivedFrom();
switch (diDerivedType.getTag()) {
case dwarf::DW_TAG_inheritance:
FormatDIType(out, diBase);
break;
case dwarf::DW_TAG_pointer_type:
FormatDIType(out, diBase);
out << _("*");
break;
case dwarf::DW_TAG_array_type:
FormatDIType(out, diBase);
// TODO: Get the array size, use LLVM array notation.
out << _("[]");
break;
case dwarf::DW_TAG_member:
out << toWxStr(diDerivedType.getName());
break;
case dwarf::DW_TAG_reference_type:
case dwarf::DW_TAG_const_type:
case dwarf::DW_TAG_volatile_type:
case dwarf::DW_TAG_restrict_type:
case dwarf::DW_TAG_typedef:
// TODO: Implement
break;
}
} else if (type.isBasicType()) {
DIBasicType diBasicType(type);
const char * encodingName =
dwarf::AttributeEncodingString(diBasicType.getEncoding());
if (encodingName != NULL) {
out << toWxStr(encodingName);
}
}
}
示例2: if
/// PopulateDebugInfo - Populate the TypeNo, Aux[] and TagName from Ty.
///
void PIC16DbgInfo::PopulateDebugInfo (DIType Ty, unsigned short &TypeNo,
bool &HasAux, int Aux[],
std::string &TagName) {
if (Ty.isBasicType(Ty.getTag()))
PopulateBasicTypeInfo (Ty, TypeNo);
else if (Ty.isDerivedType(Ty.getTag()))
PopulateDerivedTypeInfo (Ty, TypeNo, HasAux, Aux, TagName);
else if (Ty.isCompositeType(Ty.getTag()))
PopulateCompositeTypeInfo (Ty, TypeNo, HasAux, Aux, TagName);
else {
TypeNo = PIC16Dbg::T_NULL;
HasAux = false;
}
return;
}