Skip to content

[lldb][DWARFASTParserClang][NFCI] Make ParsedDWARFTypeAttributes parameter const #73833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,8 +980,9 @@ ConvertDWARFCallingConventionToClang(const ParsedDWARFTypeAttributes &attrs) {
return clang::CC_C;
}

TypeSP DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die,
ParsedDWARFTypeAttributes &attrs) {
TypeSP
DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die,
const ParsedDWARFTypeAttributes &attrs) {
Log *log = GetLog(DWARFLog::TypeCompletion | DWARFLog::Lookups);

SymbolFileDWARF *dwarf = die.GetDWARF();
Expand Down Expand Up @@ -1206,14 +1207,15 @@ TypeSP DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die,
// Neither GCC 4.2 nor clang++ currently set a valid
// accessibility in the DWARF for C++ methods...
// Default to public for now...
if (attrs.accessibility == eAccessNone)
attrs.accessibility = eAccessPublic;
const auto accessibility = attrs.accessibility == eAccessNone
? eAccessPublic
: attrs.accessibility;

clang::CXXMethodDecl *cxx_method_decl =
m_ast.AddMethodToCXXRecordType(
class_opaque_type.GetOpaqueQualType(),
attrs.name.GetCString(), attrs.mangled_name,
clang_type, attrs.accessibility, attrs.is_virtual,
clang_type, accessibility, attrs.is_virtual,
is_static, attrs.is_inline, attrs.is_explicit,
is_attr_used, attrs.is_artificial);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class DWARFASTParserClang : public lldb_private::plugin::dwarf::DWARFASTParser {
const lldb_private::plugin::dwarf::DWARFDIE &die,
ParsedDWARFTypeAttributes &attrs);
lldb::TypeSP ParseSubroutine(const lldb_private::plugin::dwarf::DWARFDIE &die,
ParsedDWARFTypeAttributes &attrs);
const ParsedDWARFTypeAttributes &attrs);
lldb::TypeSP ParseArrayType(const lldb_private::plugin::dwarf::DWARFDIE &die,
const ParsedDWARFTypeAttributes &attrs);
lldb::TypeSP
Expand Down