本文整理汇总了C++中DIType::getRef方法的典型用法代码示例。如果您正苦于以下问题:C++ DIType::getRef方法的具体用法?C++ DIType::getRef怎么用?C++ DIType::getRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIType
的用法示例。
在下文中一共展示了DIType::getRef方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createMemberPointerType
DIDerivedType DIBuilder::createMemberPointerType(DIType PointeeTy,
DIType Base) {
// Pointer types are encoded in DIDerivedType format.
Value *Elts[] = {HeaderBuilder::get(dwarf::DW_TAG_ptr_to_member_type)
.concat(StringRef())
.concat(0) // Line
.concat(0) // Size
.concat(0) // Align
.concat(0) // Offset
.concat(0) // Flags
.get(VMContext),
nullptr, // Filename
nullptr, // Unused
PointeeTy.getRef(), Base.getRef()};
return DIDerivedType(MDNode::get(VMContext, Elts));
}
示例2: createInheritance
DIDerivedType DIBuilder::createInheritance(DIType Ty, DIType BaseTy,
uint64_t BaseOffset,
unsigned Flags) {
assert(Ty.isType() && "Unable to create inheritance");
// TAG_inheritance is encoded in DIDerivedType format.
Value *Elts[] = {HeaderBuilder::get(dwarf::DW_TAG_inheritance)
.concat(StringRef()) // Name
.concat(0) // Line
.concat(0) // Size
.concat(0) // Align
.concat(BaseOffset)
.concat(Flags)
.get(VMContext),
nullptr, Ty.getRef(), BaseTy.getRef()};
return DIDerivedType(MDNode::get(VMContext, Elts));
}
示例3: createTemplateValueParameterHelper
static DITemplateValueParameter createTemplateValueParameterHelper(
LLVMContext &VMContext, unsigned Tag, DIDescriptor Context, StringRef Name,
DIType Ty, Value *Val, MDNode *File, unsigned LineNo, unsigned ColumnNo) {
Value *Elts[] = {
HeaderBuilder::get(Tag).concat(Name).concat(LineNo).concat(ColumnNo).get(
VMContext),
DIScope(getNonCompileUnitScope(Context)).getRef(), Ty.getRef(), Val,
File};
return DITemplateValueParameter(MDNode::get(VMContext, Elts));
}
示例4: DITemplateTypeParameter
DITemplateTypeParameter
DIBuilder::createTemplateTypeParameter(DIDescriptor Context, StringRef Name,
DIType Ty, MDNode *File, unsigned LineNo,
unsigned ColumnNo) {
Value *Elts[] = {HeaderBuilder::get(dwarf::DW_TAG_template_type_parameter)
.concat(Name)
.concat(LineNo)
.concat(ColumnNo)
.get(VMContext),
DIScope(getNonCompileUnitScope(Context)).getRef(),
Ty.getRef(), File};
return DITemplateTypeParameter(MDNode::get(VMContext, Elts));
}
示例5: createQualifiedType
DIDerivedType DIBuilder::createQualifiedType(unsigned Tag, DIType FromTy) {
// Qualified types are encoded in DIDerivedType format.
Value *Elts[] = {HeaderBuilder::get(Tag)
.concat(StringRef()) // Name
.concat(0) // Line
.concat(0) // Size
.concat(0) // Align
.concat(0) // Offset
.concat(0) // Flags
.get(VMContext),
nullptr, // Filename
nullptr, // Unused
FromTy.getRef()};
return DIDerivedType(MDNode::get(VMContext, Elts));
}
示例6: createTypedef
DIDerivedType DIBuilder::createTypedef(DIType Ty, StringRef Name, DIFile File,
unsigned LineNo, DIDescriptor Context) {
// typedefs are encoded in DIDerivedType format.
Value *Elts[] = {HeaderBuilder::get(dwarf::DW_TAG_typedef)
.concat(Name)
.concat(LineNo)
.concat(0) // Size
.concat(0) // Align
.concat(0) // Offset
.concat(0) // Flags
.get(VMContext),
File.getFileNode(),
DIScope(getNonCompileUnitScope(Context)).getRef(),
Ty.getRef()};
return DIDerivedType(MDNode::get(VMContext, Elts));
}
示例7: createReferenceType
DIDerivedType DIBuilder::createReferenceType(unsigned Tag, DIType RTy) {
assert(RTy.isType() && "Unable to create reference type");
// References are encoded in DIDerivedType format.
Value *Elts[] = {HeaderBuilder::get(Tag)
.concat(StringRef()) // Name
.concat(0) // Line
.concat(0) // Size
.concat(0) // Align
.concat(0) // Offset
.concat(0) // Flags
.get(VMContext),
nullptr, // Filename
nullptr, // TheCU,
RTy.getRef()};
return DIDerivedType(MDNode::get(VMContext, Elts));
}
示例8: DIDerivedType
DIDerivedType
DIBuilder::createPointerType(DIType PointeeTy, uint64_t SizeInBits,
uint64_t AlignInBits, StringRef Name) {
// Pointer types are encoded in DIDerivedType format.
Value *Elts[] = {HeaderBuilder::get(dwarf::DW_TAG_pointer_type)
.concat(Name)
.concat(0) // Line
.concat(SizeInBits)
.concat(AlignInBits)
.concat(0) // Offset
.concat(0) // Flags
.get(VMContext),
nullptr, // Filename
nullptr, // Unused
PointeeTy.getRef()};
return DIDerivedType(MDNode::get(VMContext, Elts));
}
示例9: createVectorType
DICompositeType DIBuilder::createVectorType(uint64_t Size, uint64_t AlignInBits,
DIType Ty, DIArray Subscripts) {
// A vector is an array type with the FlagVector flag applied.
Value *Elts[] = {
HeaderBuilder::get(dwarf::DW_TAG_array_type)
.concat("")
.concat(0) // Line
.concat(Size)
.concat(AlignInBits)
.concat(0) // Offset
.concat(DIType::FlagVector)
.concat(0)
.get(VMContext),
nullptr, // Filename/Directory,
nullptr, // Unused
Ty.getRef(), Subscripts, nullptr, nullptr,
nullptr // Type Identifer
};
return DICompositeType(MDNode::get(VMContext, Elts));
}
示例10: createArrayType
DICompositeType DIBuilder::createArrayType(uint64_t Size, uint64_t AlignInBits,
DIType Ty, DIArray Subscripts) {
// TAG_array_type is encoded in DICompositeType format.
Value *Elts[] = {
HeaderBuilder::get(dwarf::DW_TAG_array_type)
.concat(StringRef())
.concat(0) // Line
.concat(Size)
.concat(AlignInBits)
.concat(0) // Offset
.concat(0) // Flags
.concat(0)
.get(VMContext),
nullptr, // Filename/Directory,
nullptr, // Unused
Ty.getRef(), Subscripts, nullptr, nullptr,
nullptr // Type Identifer
};
return DICompositeType(MDNode::get(VMContext, Elts));
}
示例11: createStaticMemberType
DIDerivedType DIBuilder::createStaticMemberType(DIDescriptor Scope,
StringRef Name, DIFile File,
unsigned LineNumber, DIType Ty,
unsigned Flags,
llvm::Constant *Val) {
// TAG_member is encoded in DIDerivedType format.
Flags |= DIDescriptor::FlagStaticMember;
Value *Elts[] = {HeaderBuilder::get(dwarf::DW_TAG_member)
.concat(Name)
.concat(LineNumber)
.concat(0) // Size
.concat(0) // Align
.concat(0) // Offset
.concat(Flags)
.get(VMContext),
File.getFileNode(),
DIScope(getNonCompileUnitScope(Scope)).getRef(), Ty.getRef(),
Val};
return DIDerivedType(MDNode::get(VMContext, Elts));
}
示例12: createMemberType
DIDerivedType DIBuilder::createMemberType(DIDescriptor Scope, StringRef Name,
DIFile File, unsigned LineNumber,
uint64_t SizeInBits,
uint64_t AlignInBits,
uint64_t OffsetInBits, unsigned Flags,
DIType Ty) {
// TAG_member is encoded in DIDerivedType format.
Value *Elts[] = {HeaderBuilder::get(dwarf::DW_TAG_member)
.concat(Name)
.concat(LineNumber)
.concat(SizeInBits)
.concat(AlignInBits)
.concat(OffsetInBits)
.concat(Flags)
.get(VMContext),
File.getFileNode(),
DIScope(getNonCompileUnitScope(Scope)).getRef(),
Ty.getRef()};
return DIDerivedType(MDNode::get(VMContext, Elts));
}
示例13: createMethod
DISubprogram DIBuilder::createMethod(DIDescriptor Context, StringRef Name,
StringRef LinkageName, DIFile F,
unsigned LineNo, DICompositeType Ty,
bool isLocalToUnit, bool isDefinition,
unsigned VK, unsigned VIndex,
DIType VTableHolder, unsigned Flags,
bool isOptimized, Function *Fn,
MDNode *TParam) {
assert(Ty.getTag() == dwarf::DW_TAG_subroutine_type &&
"function types should be subroutines");
assert(getNonCompileUnitScope(Context) &&
"Methods should have both a Context and a context that isn't "
"the compile unit.");
Value *Elts[] = {HeaderBuilder::get(dwarf::DW_TAG_subprogram)
.concat(Name)
.concat(Name)
.concat(LinkageName)
.concat(LineNo)
.concat(isLocalToUnit)
.concat(isDefinition)
.concat(VK)
.concat(VIndex)
.concat(Flags)
.concat(isOptimized)
.concat(LineNo)
// FIXME: Do we want to use different scope/lines?
.get(VMContext),
F.getFileNode(), DIScope(Context).getRef(), Ty,
VTableHolder.getRef(), Fn, TParam, nullptr, nullptr};
MDNode *Node = MDNode::get(VMContext, Elts);
if (isDefinition)
AllSubprograms.push_back(Node);
DISubprogram S(Node);
assert(S.isSubprogram() && "createMethod should return a valid DISubprogram");
return S;
}