diff options
author | Devang Patel <dpatel@apple.com> | 2010-04-21 23:12:37 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-04-21 23:12:37 +0000 |
commit | b9ab309650c5eaeb3cafd28079171824d2713e76 (patch) | |
tree | 2c715d7343b227164026951a6d569114447cdf80 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 26274da38f2545abd148284b76013fba2040d525 (diff) | |
download | bcm5719-llvm-b9ab309650c5eaeb3cafd28079171824d2713e76.tar.gz bcm5719-llvm-b9ab309650c5eaeb3cafd28079171824d2713e76.zip |
Encode field accessibility.
llvm-svn: 102033
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 1fdb2e5c20d..2a5b7af7121 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -525,13 +525,20 @@ CollectRecordFields(const RecordDecl *RD, llvm::DIFile Unit, uint64_t FieldOffset = RL.getFieldOffset(FieldNo); + unsigned Flags = 0; + AccessSpecifier Access = I->getAccess(); + if (Access == clang::AS_private) + Flags |= llvm::DIType::FlagPrivate; + else if (Access == clang::AS_protected) + Flags |= llvm::DIType::FlagProtected; + // Create a DW_TAG_member node to remember the offset of this field in the // struct. FIXME: This is an absolutely insane way to capture this // information. When we gut debug info, this should be fixed. FieldTy = DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_member, Unit, FieldName, FieldDefUnit, FieldLine, FieldSize, FieldAlign, - FieldOffset, 0, FieldTy); + FieldOffset, Flags, FieldTy); EltTys.push_back(FieldTy); } } |