aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-01-21 00:08:04 +0000
committerDevang Patel <dpatel@apple.com>2009-01-21 00:08:04 +0000
commit476615934a74a313a691413230d249889cfaa2f8 (patch)
tree515d5764fbf59cc7aaf9bbec1c66a861b7c3f698
parent2a574669f3aed5951dcd62fa14c25dcde4d1a754 (diff)
Encode member accessibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62638 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/DebugInfo.h2
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfWriter.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index 4109551481..63206ea6fc 100644
--- a/include/llvm/Analysis/DebugInfo.h
+++ b/include/llvm/Analysis/DebugInfo.h
@@ -133,7 +133,7 @@ namespace llvm {
enum {
FlagPrivate = 1 << 0,
FlagProtected = 1 << 1,
- FlagFwdDecl = 1 << 2
+ FlagFwdDecl = 1 << 2
};
protected:
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index a2934bd8c7..4ca5583a6c 100644
--- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
@@ -1913,7 +1913,11 @@ private:
AddUInt(Block, 0, DW_FORM_udata, DT.getOffsetInBits() >> 3);
AddBlock(MemberDie, DW_AT_data_member_location, 0, Block);
- // FIXME - Handle DW_AT_accessibility
+ if (DT.isProtected())
+ AddUInt(MemberDie, DW_AT_accessibility, 0, DW_ACCESS_protected);
+ else if (DT.isPrivate())
+ AddUInt(MemberDie, DW_AT_accessibility, 0, DW_ACCESS_private);
+
return MemberDie;
}