[Lldb-commits] [lldb] c0ccb58 - [lldb] Pass fewer parameters by non-const reference to DWARFASTParserClang::ParseSingleMember

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 3 03:42:34 PDT 2020


Author: Raphael Isemann
Date: 2020-06-03T12:42:09+02:00
New Revision: c0ccb582c35f29df55ccc421dd5d03a7220456cf

URL: https://github.com/llvm/llvm-project/commit/c0ccb582c35f29df55ccc421dd5d03a7220456cf
DIFF: https://github.com/llvm/llvm-project/commit/c0ccb582c35f29df55ccc421dd5d03a7220456cf.diff

LOG: [lldb] Pass fewer parameters by non-const reference to DWARFASTParserClang::ParseSingleMember

These parameters are only passed on by value or const reference, so we should
do the same when calling this function.

Added: 
    

Modified: 
    lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
    lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 1540bdbea6ab..2b51be84752a 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2385,10 +2385,10 @@ Function *DWARFASTParserClang::ParseFunctionFromDWARF(CompileUnit &comp_unit,
 
 void DWARFASTParserClang::ParseSingleMember(
     const DWARFDIE &die, const DWARFDIE &parent_die,
-    lldb_private::CompilerType &class_clang_type,
+    const lldb_private::CompilerType &class_clang_type,
     const lldb::LanguageType class_language,
     std::vector<int> &member_accessibilities,
-    lldb::AccessType &default_accessibility,
+    lldb::AccessType default_accessibility,
     DelayedPropertyList &delayed_properties,
     lldb_private::ClangASTImporter::LayoutInfo &layout_info,
     FieldInfo &last_field_info) {

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
index 020d29d65eae..71d978536f8f 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
@@ -194,10 +194,10 @@ class DWARFASTParserClang : public DWARFASTParser {
 
   void
   ParseSingleMember(const DWARFDIE &die, const DWARFDIE &parent_die,
-                    lldb_private::CompilerType &class_clang_type,
+                    const lldb_private::CompilerType &class_clang_type,
                     const lldb::LanguageType class_language,
                     std::vector<int> &member_accessibilities,
-                    lldb::AccessType &default_accessibility,
+                    lldb::AccessType default_accessibility,
                     DelayedPropertyList &delayed_properties,
                     lldb_private::ClangASTImporter::LayoutInfo &layout_info,
                     FieldInfo &last_field_info);


        


More information about the lldb-commits mailing list