aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/DwarfWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/DwarfWriter.cpp')
-rw-r--r--lib/CodeGen/DwarfWriter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp
index 55bac8b11b..14bb9622ed 100644
--- a/lib/CodeGen/DwarfWriter.cpp
+++ b/lib/CodeGen/DwarfWriter.cpp
@@ -1383,6 +1383,12 @@ DIE *DwarfWriter::NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit) {
Block->AddUInt(DW_FORM_udata, FieldOffset >> 3);
Block->ComputeSize(*this);
Member->AddBlock(DW_AT_data_member_location, 0, Block);
+
+ if (MemberDesc->isProtected()) {
+ Member->AddUInt(DW_AT_accessibility, 0, DW_ACCESS_protected);
+ } else if (MemberDesc->isPrivate()) {
+ Member->AddUInt(DW_AT_accessibility, 0, DW_ACCESS_private);
+ }
Ty->AddChild(Member);
}