本文整理汇总了C++中DIType::getFile方法的典型用法代码示例。如果您正苦于以下问题:C++ DIType::getFile方法的具体用法?C++ DIType::getFile怎么用?C++ DIType::getFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIType
的用法示例。
在下文中一共展示了DIType::getFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createInheritance
/// createInheritance - Create debugging information entry to establish
/// inheritance relationship between two types.
DIType DIBuilder::createInheritance(DIType Ty, DIType BaseTy,
uint64_t BaseOffset, unsigned Flags) {
assert(Ty.Verify() && "Unable to create inheritance");
// TAG_inheritance is encoded in DIDerivedType format.
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_inheritance),
Ty,
NULL, // Name
Ty.getFile(),
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Line
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Size
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Align
ConstantInt::get(Type::getInt64Ty(VMContext), BaseOffset),
ConstantInt::get(Type::getInt32Ty(VMContext), Flags),
BaseTy
};
return DIType(MDNode::get(VMContext, Elts));
}
示例2: createFriend
/// createFriend - Create debugging information entry for a 'friend'.
DIType DIBuilder::createFriend(DIType Ty, DIType FriendTy) {
// typedefs are encoded in DIDerivedType format.
assert(Ty.Verify() && "Invalid type!");
assert(FriendTy.Verify() && "Invalid friend type!");
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_friend),
Ty,
NULL, // Name
Ty.getFile(),
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Line
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Size
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Align
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Offset
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags
FriendTy
};
return DIType(MDNode::get(VMContext, Elts));
}