aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/DIBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/DIBuilder.cpp')
-rw-r--r--lib/IR/DIBuilder.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index 802c33289c..9fd0cd8683 100644
--- a/lib/IR/DIBuilder.cpp
+++ b/lib/IR/DIBuilder.cpp
@@ -229,6 +229,24 @@ DIType DIBuilder::createPointerType(DIType PointeeTy, uint64_t SizeInBits,
return DIType(MDNode::get(VMContext, Elts));
}
+DIType DIBuilder::createMemberPointerType(DIType PointeeTy, DIType Base) {
+ // Pointer types are encoded in DIDerivedType format.
+ Value *Elts[] = {
+ GetTagConstant(VMContext, dwarf::DW_TAG_ptr_to_member_type),
+ NULL, //TheCU,
+ NULL,
+ NULL, // Filename
+ ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Line
+ ConstantInt::get(Type::getInt64Ty(VMContext), 0),
+ ConstantInt::get(Type::getInt64Ty(VMContext), 0),
+ ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Offset
+ ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags
+ PointeeTy,
+ Base
+ };
+ return DIType(MDNode::get(VMContext, Elts));
+}
+
/// createReferenceType - Create debugging information entry for a reference
/// type.
DIType DIBuilder::createReferenceType(unsigned Tag, DIType RTy) {