1. Support for c++ mangled names.
2. Support for private/protected class members.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29104 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp
index 55bac8b..14bb962 100644
--- a/lib/CodeGen/DwarfWriter.cpp
+++ b/lib/CodeGen/DwarfWriter.cpp
@@ -1383,6 +1383,12 @@
         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);
       }