mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 14:10:41 +00:00
Assign DW_ACCESS_public accessibility attribute to members by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115067 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
828916203a
commit
2a3616012c
@ -1267,7 +1267,8 @@ DIE *DwarfDebug::createMemberDIE(DIDerivedType DT) {
|
||||
else if (DT.isPrivate())
|
||||
addUInt(MemberDie, dwarf::DW_AT_accessibility, dwarf::DW_FORM_flag,
|
||||
dwarf::DW_ACCESS_private);
|
||||
else if (DT.getTag() == dwarf::DW_TAG_inheritance)
|
||||
// Otherwise C++ member and base classes are considered public.
|
||||
else if (DT.getCompileUnit().getLanguage() == dwarf::DW_LANG_C_plus_plus)
|
||||
addUInt(MemberDie, dwarf::DW_AT_accessibility, dwarf::DW_FORM_flag,
|
||||
dwarf::DW_ACCESS_public);
|
||||
if (DT.isVirtual())
|
||||
@ -3168,6 +3169,14 @@ void DwarfDebug::emitDIE(DIE *Die) {
|
||||
Values[i]->EmitValue(Asm, Form);
|
||||
break;
|
||||
}
|
||||
case dwarf::DW_AT_accessibility: {
|
||||
if (Asm->isVerbose()) {
|
||||
DIEInteger *V = cast<DIEInteger>(Values[i]);
|
||||
Asm->OutStreamer.AddComment(dwarf::AccessibilityString(V->getValue()));
|
||||
}
|
||||
Values[i]->EmitValue(Asm, Form);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Emit an attribute using the defined form.
|
||||
Values[i]->EmitValue(Asm, Form);
|
||||
|
Loading…
Reference in New Issue
Block a user