[PATCH] D115606: [DebugInfo][DWARF] emit DW_AT_accessibility attribute for class/struct/union types.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 12 22:04:58 PST 2021
dblaikie added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1010-1020
+ // Add accessibility info if available.
+ if (CTy->isProtected())
+ addUInt(Buffer, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1,
+ dwarf::DW_ACCESS_protected);
+ else if (CTy->isPrivate())
+ addUInt(Buffer, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1,
+ dwarf::DW_ACCESS_private);
----------------
Could this be shared with some other code that handles accessibility attributes for other entities? (refactor into a common function and call it from here and wherever else this is already handled?)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115606/new/
https://reviews.llvm.org/D115606
More information about the llvm-commits
mailing list