-mainrename
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 14 Nov 2020 15:10:14 +0000 (16:10 +0100)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 14 Nov 2020 15:10:14 +0000 (16:10 +0100)
20 files changed:
lldb/include/lldb/Symbol/CompileUnit.h
lldb/include/lldb/Symbol/SymbolContext.h
lldb/include/lldb/Symbol/SymbolFile.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFTypeUnit.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFTypeUnit.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
lldb/source/Symbol/CompileUnit.cpp
lldb/source/Symbol/SymbolContext.cpp

index a9f9c6c..4ddc306 100644 (file)
@@ -405,7 +405,7 @@ public:
   /// Returns the number of functions in this compile unit
   size_t GetNumFunctions() const { return m_functions_by_uid.size(); }
 
-  DWARFCompileUnit *GetMainDWARFCompileUnit();
+  DWARFCompileUnit *GetDWARFCompileUnit();
 
 protected:
   /// User data for the SymbolFile parser to store information into.
index b2c6ad8..b3f8849 100644 (file)
@@ -316,7 +316,7 @@ public:
                                SymbolContext &next_frame_sc,
                                Address &inlined_frame_addr) const;
 
-  DWARFCompileUnit *GetMainDWARFCompileUnit(SymbolFileDWARF **dwarf_return = nullptr) const;
+  DWARFCompileUnit *GetDWARFCompileUnit(SymbolFileDWARF **dwarf_return = nullptr) const;
 
   // Member variables
   lldb::TargetSP target_sp; ///< The Target for a given query
index 1b6a4e9..cc6bcd8 100644 (file)
@@ -298,7 +298,7 @@ public:
 
   virtual void Dump(Stream &s);
 
-  virtual DWARFCompileUnit *GetMainDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) { return nullptr; }
+  virtual DWARFCompileUnit *GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) { return nullptr; }
 
 protected:
   void AssertModuleLock();
index bcc4e17..8bb66b7 100644 (file)
@@ -151,7 +151,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromClangModule(const SymbolContext &sc,
     return TypeSP();
 
   SymbolFileDWARF *dwarf;
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit(&dwarf);
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit(&dwarf);
 
   // If this type comes from a Clang module, recursively look in the
   // DWARF section of the .pcm file in the module cache. Clang
@@ -452,7 +452,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc,
                                         DWARF_LOG_LOOKUPS));
 
   SymbolFileDWARF *dwarf;
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit(&dwarf);
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit(&dwarf);
   if (log) {
     DWARFDIE context_die;
     clang::DeclContext *context =
@@ -557,7 +557,7 @@ DWARFASTParserClang::ParseTypeModifier(const SymbolContext &sc,
   Log *log(LogChannelDWARF::GetLogIfAny(DWARF_LOG_TYPE_COMPLETION |
                                         DWARF_LOG_LOOKUPS));
   SymbolFileDWARF *dwarf;
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit(&dwarf);
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit(&dwarf);
   const dw_tag_t tag = die.Tag();
   LanguageType cu_language =
       SymbolFileDWARF::GetLanguage(*die.GetMainDWARFUnit(main_unit));
@@ -787,7 +787,7 @@ TypeSP DWARFASTParserClang::ParseEnum(const SymbolContext &sc,
   TypeSP type_sp;
 
   SymbolFileDWARF *dwarf;
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit(&dwarf);
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit(&dwarf);
   if (attrs.is_forward_declaration) {
     type_sp = ParseTypeFromClangModule(sc, die, log);
     if (type_sp)
@@ -897,7 +897,7 @@ TypeSP DWARFASTParserClang::ParseSubroutine(const SymbolContext &sc,
                                         DWARF_LOG_LOOKUPS));
 
   SymbolFileDWARF *dwarf;
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit(&dwarf);
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit(&dwarf);
   const dw_tag_t tag = die.Tag();
 
   bool is_variadic = false;
@@ -1322,7 +1322,7 @@ TypeSP DWARFASTParserClang::ParseArrayType(const SymbolContext &sc,
                DW_TAG_value_to_name(tag), type_name_cstr);
 
   SymbolFileDWARF *dwarf;
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit(&dwarf);
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit(&dwarf);
   DWARFDIE type_die = attrs.type.Reference();
   Type *element_type = dwarf->ResolveTypeUID(main_unit, type_die, true);
 
@@ -1373,7 +1373,7 @@ TypeSP DWARFASTParserClang::ParsePointerToMemberType(
     const SymbolContext &sc, const DWARFDIE &die,
     const ParsedDWARFTypeAttributes &attrs) {
   SymbolFileDWARF *dwarf;
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit(&dwarf);
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit(&dwarf);
   Type *pointee_type =
       dwarf->ResolveTypeUID(main_unit, attrs.type.Reference(), true);
   Type *class_type =
@@ -1400,7 +1400,7 @@ TypeSP DWARFASTParserClang::UpdateSymbolContextScopeForType(
     return type_sp;
 
   SymbolFileDWARF *dwarf;
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit(&dwarf);
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit(&dwarf);
   TypeList &type_list = dwarf->GetTypeList();
   DWARFDIE sc_parent_die = SymbolFileDWARF::GetParentSymbolContextDIE(die);
   dw_tag_t sc_parent_tag = sc_parent_die.Tag();
@@ -1440,7 +1440,7 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
   CompilerType clang_type;
   const dw_tag_t tag = die.Tag();
   SymbolFileDWARF *dwarf;
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit(&dwarf);
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit(&dwarf);
   LanguageType cu_language = SymbolFileDWARF::GetLanguage(*die.GetMainDWARFUnit(main_unit));
   Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_TYPE_COMPLETION |
                                           DWARF_LOG_LOOKUPS);
@@ -1990,7 +1990,7 @@ bool DWARFASTParserClang::CompleteRecordType(DWARFCompileUnit *main_unit, const
       type->GetSymbolContextScope()->CalculateSymbolContextCompileUnit();
   // comp_unit may be a CU with DIE being only declaration.
   // Then 'die' will be a definition in a different CU with different 'main_unit'.
-  //DWARFCompileUnit *main_unit_check = sc.GetMainDWARFCompileUnit(&dwarf);
+  //DWARFCompileUnit *main_unit_check = sc.GetDWARFCompileUnit(&dwarf);
   //lldbassert(main_unit_check && &main_unit_check->GetNonSkeletonUnit() == main_unit);
 
   ClangASTImporter::LayoutInfo layout_info;
@@ -2131,7 +2131,7 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(DWARFCompileUnit *main_unit, con
   SymbolFileDWARF *dwarf = main_unit ? &main_unit->GetSymbolFileDWARF() : llvm::cast<SymbolFileDWARF>(type->GetSymbolContextScope()->CalculateSymbolContextModule()->GetSymbolFile());
   // sc.comp_unit may be a CU with DIE being only declaration.
   // Then 'die' will be a definition in a different CU with different 'main_unit'.
-  //DWARFCompileUnit *main_unit_check = sc.GetMainDWARFCompileUnit(&dwarf);
+  //DWARFCompileUnit *main_unit_check = sc.GetDWARFCompileUnit(&dwarf);
   //lldbassert(main_unit_check && &main_unit_check->GetNonSkeletonUnit() == main_unit);
 
   std::lock_guard<std::recursive_mutex> guard(
@@ -2314,7 +2314,7 @@ Function *DWARFASTParserClang::ParseFunctionFromDWARF(CompileUnit &comp_unit,
     }
 
     if (func_range.GetBaseAddress().IsValid()) {
-      DWARFCompileUnit *main_unit = comp_unit.GetMainDWARFCompileUnit();
+      DWARFCompileUnit *main_unit = comp_unit.GetDWARFCompileUnit();
       SymbolFileDWARF *dwarf = &main_unit->GetSymbolFileDWARF();
       Mangled func_name;
       if (mangled)
@@ -2577,7 +2577,7 @@ void DWARFASTParserClang::ParseSingleMember(lldb_private::CompileUnit *comp_unit
   if (class_is_objc_object_or_interface)
     accessibility = eAccessNone;
 
-  DWARFCompileUnit *main_unit = !comp_unit ? nullptr : comp_unit->GetMainDWARFCompileUnit();
+  DWARFCompileUnit *main_unit = !comp_unit ? nullptr : comp_unit->GetDWARFCompileUnit();
 
   // Handle static members
   if (is_external && member_byte_offset == UINT32_MAX) {
@@ -2827,7 +2827,7 @@ bool DWARFASTParserClang::ParseChildMembers(
   if (ast == nullptr)
     return false;
 
-  DWARFCompileUnit *main_unit = !comp_unit ? nullptr : comp_unit->GetMainDWARFCompileUnit();
+  DWARFCompileUnit *main_unit = !comp_unit ? nullptr : comp_unit->GetDWARFCompileUnit();
 
   for (DWARFDIE die = parent_die.GetFirstChild(); die.IsValid();
        die = die.GetSibling()) {
@@ -2980,7 +2980,7 @@ size_t DWARFASTParserClang::ParseChildParameters(
   if (!parent_die)
     return 0;
 
-  DWARFCompileUnit *main_unit = !comp_unit ? nullptr : comp_unit->GetMainDWARFCompileUnit();
+  DWARFCompileUnit *main_unit = !comp_unit ? nullptr : comp_unit->GetDWARFCompileUnit();
 
   size_t arg_idx = 0;
   for (DWARFDIE die = parent_die.GetFirstChild(); die.IsValid();
index 99f2238..cf16308 100644 (file)
@@ -117,10 +117,10 @@ DWARFDIE DWARFCompileUnit::LookupAddress(const dw_addr_t address) {
 }
 
 DWARFCompileUnit *
-DWARFCompileUnit::GetMainDWARFCompileUnit(DWARFCompileUnit *main_unit) {
+DWARFCompileUnit::GetDWARFCompileUnit(DWARFCompileUnit *main_unit) {
   // if (GetUnitDIEOnly().Tag() != DW_TAG_partial_unit)
   main_unit = reinterpret_cast<DWARFCompileUnit *>(this);
-  return DWARFUnit::GetMainDWARFCompileUnit(main_unit);
+  return DWARFUnit::GetDWARFCompileUnit(main_unit);
 }
 
 CompileUnit *DWARFCompileUnit::GetCompUnit() {
index 4e2f788..9fb73a7 100644 (file)
@@ -24,7 +24,7 @@ public:
 
   DWARFDIE LookupAddress(const dw_addr_t address);
 
-  DWARFCompileUnit *GetMainDWARFCompileUnit(DWARFCompileUnit *main_unit) override;
+  DWARFCompileUnit *GetDWARFCompileUnit(DWARFCompileUnit *main_unit) override;
 
   DWARFDIE DIE() { return {this, DIEPtr()}; }
 
index 7df02a3..975e012 100644 (file)
@@ -459,10 +459,10 @@ bool DWARFDIE::GetDIENamesAndRanges(
 }
 
 DWARFCompileUnit *
-DWARFDIE::GetMainDWARFCompileUnit(DWARFCompileUnit *main_unit) const {
+DWARFDIE::GetDWARFCompileUnit(DWARFCompileUnit *main_unit) const {
   if (!IsValid())
     return nullptr;
-  return GetCU()->GetMainDWARFCompileUnit(main_unit);
+  return GetCU()->GetDWARFCompileUnit(main_unit);
 }
 
 DWARFUnit *DWARFDIE::GetMainDWARFUnit(DWARFCompileUnit *main_unit) const {
@@ -472,10 +472,10 @@ DWARFUnit *DWARFDIE::GetMainDWARFUnit(DWARFCompileUnit *main_unit) const {
 
 std::pair<DWARFCompileUnit *, DWARFDIE>
 DWARFDIE::MainCUtoDWARFDIEPair(DWARFCompileUnit *main_unit) const {
-  return std::make_pair(GetMainDWARFCompileUnit(main_unit), *this);
+  return std::make_pair(GetDWARFCompileUnit(main_unit), *this);
 }
 
 std::pair<DWARFCompileUnit *, DWARFDebugInfoEntry *>
 DWARFDIE::MainCUtoDIEPair(DWARFCompileUnit *main_unit) const {
-  return std::make_pair(GetMainDWARFCompileUnit(main_unit), GetDIE());
+  return std::make_pair(GetDWARFCompileUnit(main_unit), GetDIE());
 }
index 20fb954..0a80f2a 100644 (file)
@@ -96,7 +96,7 @@ public:
                             int &call_line, int &call_column,
                             lldb_private::DWARFExpression *frame_base) const;
 
-  DWARFCompileUnit *GetMainDWARFCompileUnit(DWARFCompileUnit *main_unit) const;
+  DWARFCompileUnit *GetDWARFCompileUnit(DWARFCompileUnit *main_unit) const;
   DWARFUnit *GetMainDWARFUnit(DWARFCompileUnit *main_unit) const;
   std::pair<DWARFCompileUnit *, DWARFDIE>
   MainCUtoDWARFDIEPair(DWARFCompileUnit *main_unit) const;
index 953ca47..f50db46 100644 (file)
@@ -30,7 +30,7 @@ bool DWARFIndex::ProcessFunctionDIE(
     ReportInvalidDIERef(ref, name);
     return true;
   }
-  main_unit = die.GetMainDWARFCompileUnit(main_unit);
+  main_unit = die.GetDWARFCompileUnit(main_unit);
 
   // Exit early if we're searching exclusively for methods or selectors and
   // we have a context specified (no methods in namespaces).
index 88ee671..9a7464d 100644 (file)
@@ -22,6 +22,6 @@ void DWARFTypeUnit::Dump(Stream *s) const {
             GetAddressByteSize(), GetNextUnitOffset());
 }
 
-DWARFCompileUnit *DWARFTypeUnit::GetMainDWARFCompileUnit(DWARFCompileUnit *main_unit) {
+DWARFCompileUnit *DWARFTypeUnit::GetDWARFCompileUnit(DWARFCompileUnit *main_unit) {
   return nullptr;
 }
index 7c66df8..8884374 100644 (file)
@@ -24,7 +24,7 @@ public:
 
   static bool classof(const DWARFUnit *unit) { return unit->IsTypeUnit(); }
 
-  DWARFCompileUnit *GetMainDWARFCompileUnit(DWARFCompileUnit *main_unit) override;
+  DWARFCompileUnit *GetDWARFCompileUnit(DWARFCompileUnit *main_unit) override;
 
 private:
   DWARFTypeUnit(SymbolFileDWARF &dwarf, lldb::user_id_t uid,
index 2641075..59cad58 100644 (file)
@@ -969,14 +969,14 @@ DWARFUnit::FindRnglistFromIndex(uint32_t index) {
 }
 
 DWARFCompileUnit *
-DWARFUnit::GetMainDWARFCompileUnit(DWARFCompileUnit *main_unit) {
+DWARFUnit::GetDWARFCompileUnit(DWARFCompileUnit *main_unit) {
   lldbassert(main_unit);
   main_unit = &main_unit->GetNonSkeletonUnit();
   return main_unit;
 }
 
 DWARFUnit *DWARFUnit::GetMainDWARFUnit(DWARFCompileUnit *main_unit) {
-  main_unit = GetMainDWARFCompileUnit(main_unit);
+  main_unit = GetDWARFCompileUnit(main_unit);
   if (main_unit)
     return main_unit;
   return this;
index 57b3cfe..2b923a5 100644 (file)
@@ -261,7 +261,7 @@ public:
 
   lldb_private::DWARFDataExtractor GetLocationData() const;
 
-  virtual DWARFCompileUnit *GetMainDWARFCompileUnit(DWARFCompileUnit *main_unit);
+  virtual DWARFCompileUnit *GetDWARFCompileUnit(DWARFCompileUnit *main_unit);
   DWARFUnit *GetMainDWARFUnit(DWARFCompileUnit *main_unit);
 
 protected:
index a8fd880..669e0c8 100644 (file)
@@ -73,7 +73,7 @@ bool DebugNamesDWARFIndex::ProcessEntry(
   if (!die)
     return true;
   // FIXME: DWZ
-  DWARFCompileUnit *main_unit = die.GetMainDWARFCompileUnit(nullptr);
+  DWARFCompileUnit *main_unit = die.GetDWARFCompileUnit(nullptr);
   return callback(main_unit, die);
 }
 
index b63d361..e9fa4e2 100644 (file)
@@ -385,7 +385,7 @@ void SymbolFileDWARF::GetTypes(SymbolContextScope *sc_scope,
              type_mask, type_set);
   };
   if (comp_unit) {
-    get(GetMainDWARFCompileUnit(comp_unit));
+    get(GetDWARFCompileUnit(comp_unit));
   } else {
     DWARFDebugInfo &info = DebugInfo();
     const size_t num_cus = info.GetNumUnits();
@@ -633,13 +633,12 @@ DWARFDebugInfo &SymbolFileDWARF::DebugInfo() {
   return *m_info;
 }
 
-DWARFCompileUnit *
-SymbolFileDWARF::GetMainDWARFCompileUnit(CompileUnit *comp_unit) {
+DWARFCompileUnit *SymbolFileDWARF::GetDWARFCompileUnit(CompileUnit *comp_unit) {
   if (!comp_unit)
     return nullptr;
 
   if (SymbolFileDWARFDwo *dwo = llvm::dyn_cast<SymbolFileDWARFDwo>(this))
-    return dwo->GetBaseSymbolFile().GetMainDWARFCompileUnit(comp_unit);
+    return dwo->GetBaseSymbolFile().GetDWARFCompileUnit(comp_unit);
 
   // The compile unit ID is the index of the DWARF unit.
   DWARFUnit *dwarf_cu = DebugInfo().GetUnitAtIndex(comp_unit->GetID());
@@ -775,7 +774,7 @@ Function *SymbolFileDWARF::ParseFunction(CompileUnit &comp_unit,
   if (!die.IsValid())
     return nullptr;
 
-  DWARFCompileUnit *main_unit = comp_unit.GetMainDWARFCompileUnit();
+  DWARFCompileUnit *main_unit = comp_unit.GetDWARFCompileUnit();
 
   auto type_system_or_err = GetTypeSystemForLanguage(GetLanguage(*die.GetMainDWARFUnit(main_unit)));
   if (auto err = type_system_or_err.takeError()) {
@@ -807,7 +806,7 @@ bool SymbolFileDWARF::FixupAddress(Address &addr) {
 }
 lldb::LanguageType SymbolFileDWARF::ParseLanguage(CompileUnit &comp_unit) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
-  DWARFCompileUnit *dwarf_cu = GetMainDWARFCompileUnit(&comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (dwarf_cu)
     return GetLanguage(*dwarf_cu);
   else
@@ -816,7 +815,7 @@ lldb::LanguageType SymbolFileDWARF::ParseLanguage(CompileUnit &comp_unit) {
 
 XcodeSDK SymbolFileDWARF::ParseXcodeSDK(CompileUnit &comp_unit) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
-  DWARFUnit *dwarf_cu = GetMainDWARFCompileUnit(&comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (!dwarf_cu)
     return {};
   const DWARFBaseDIE cu_die = dwarf_cu->GetNonSkeletonUnit().GetUnitDIEOnly();
@@ -846,7 +845,7 @@ size_t SymbolFileDWARF::ParseFunctions(CompileUnit &comp_unit) {
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat, "SymbolFileDWARF::ParseFunctions");
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
-  DWARFCompileUnit *dwarf_cu = GetMainDWARFCompileUnit(&comp_unit);
+  DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (!dwarf_cu)
     return 0;
 
@@ -897,7 +896,7 @@ bool SymbolFileDWARF::ForEachExternalModule(
 bool SymbolFileDWARF::ParseSupportFiles(CompileUnit &comp_unit,
                                         FileSpecList &support_files) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
-  DWARFUnit *dwarf_cu = GetMainDWARFCompileUnit(&comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (!dwarf_cu)
     return false;
 
@@ -966,7 +965,7 @@ SymbolFileDWARF::GetTypeUnitSupportFiles(DWARFTypeUnit &tu) {
 
 bool SymbolFileDWARF::ParseIsOptimized(CompileUnit &comp_unit) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
-  DWARFUnit *dwarf_cu = GetMainDWARFCompileUnit(&comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (dwarf_cu)
     return dwarf_cu->GetIsOptimized();
   return false;
@@ -977,7 +976,7 @@ bool SymbolFileDWARF::ParseImportedModules(
     std::vector<SourceModule> &imported_modules) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   SymbolFileDWARF *dwarf_check;
-  DWARFCompileUnit *dwarf_cu = sc.GetMainDWARFCompileUnit(&dwarf_check);
+  DWARFUnit *dwarf_cu = sc.GetDWARFCompileUnit(&dwarf_check);
   lldbassert(dwarf_check == this);
   if (!dwarf_cu)
     return false;
@@ -1033,7 +1032,7 @@ bool SymbolFileDWARF::ParseLineTable(CompileUnit &comp_unit) {
   if (comp_unit.GetLineTable() != nullptr)
     return true;
 
-  DWARFUnit *dwarf_cu = GetMainDWARFCompileUnit(&comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (!dwarf_cu)
     return false;
 
@@ -1108,7 +1107,7 @@ SymbolFileDWARF::ParseDebugMacros(lldb::offset_t *offset) {
 bool SymbolFileDWARF::ParseDebugMacros(CompileUnit &comp_unit) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
 
-  DWARFUnit *dwarf_cu = GetMainDWARFCompileUnit(&comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (dwarf_cu == nullptr)
     return false;
 
@@ -1152,7 +1151,7 @@ size_t SymbolFileDWARF::ParseBlocksRecursive(
 
         block = parent_block;
       } else {
-        DWARFCompileUnit *dwarf_cu = comp_unit.GetMainDWARFCompileUnit();
+        DWARFCompileUnit *dwarf_cu = comp_unit.GetDWARFCompileUnit();
         BlockSP block_sp(new Block(die.GetID(dwarf_cu)));
         parent_block->AddChild(block_sp);
         block = block_sp.get();
@@ -1673,7 +1672,7 @@ static uint64_t GetDWOId(DWARFCompileUnit &dwarf_cu,
 llvm::Optional<uint64_t> SymbolFileDWARF::GetDWOId() {
   if (GetNumCompileUnits() == 1) {
     if (auto comp_unit = GetCompileUnitAtIndex(0))
-      if (DWARFCompileUnit *cu = GetMainDWARFCompileUnit(comp_unit.get()))
+      if (DWARFCompileUnit *cu = GetDWARFCompileUnit(comp_unit.get()))
         if (DWARFDebugInfoEntry *cu_die = cu->DIE().GetDIE())
           if (uint64_t dwo_id = ::GetDWOId(*cu, *cu_die))
             return dwo_id;
@@ -1883,7 +1882,7 @@ SymbolFileDWARF::GlobalVariableMap &SymbolFileDWARF::GetGlobalAranges() {
 void SymbolFileDWARF::ResolveFunctionAndBlock(lldb::addr_t file_vm_addr,
                                               bool lookup_block,
                                               SymbolContext &sc) {
-  DWARFCompileUnit *cu = sc.GetMainDWARFCompileUnit();
+  DWARFCompileUnit *cu = sc.GetDWARFCompileUnit();
   lldbassert(cu);
   cu = &cu->GetNonSkeletonUnit();
   DWARFDIE function_die = cu->LookupAddress(file_vm_addr);
@@ -3021,7 +3020,7 @@ TypeSP SymbolFileDWARF::ParseType(const SymbolContext &sc, const DWARFDIE &die,
   if (!die)
     return {};
 
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit();
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit();
   auto type_system_or_err = GetTypeSystemForLanguage(GetLanguage(*die.GetMainDWARFUnit(main_unit)));
   if (auto err = type_system_or_err.takeError()) {
     LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
@@ -3075,7 +3074,7 @@ size_t SymbolFileDWARF::ParseTypes(const SymbolContext &sc,
 
     if (parse_children && die.HasChildren()) {
       if (die.Tag() == DW_TAG_subprogram) {
-        DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit();
+        DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit();
         SymbolContext child_sc(sc);
         child_sc.function =
             sc.comp_unit->FindFunctionByUID(die.GetID(main_unit)).get();
@@ -3097,7 +3096,7 @@ size_t SymbolFileDWARF::ParseBlocksRecursive(Function &func) {
   CompileUnit *comp_unit = func.GetCompileUnit();
   lldbassert(comp_unit);
 
-  DWARFCompileUnit *dwarf_cu = GetMainDWARFCompileUnit(comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(comp_unit);
   if (!dwarf_cu)
     return 0;
 
@@ -3116,7 +3115,7 @@ size_t SymbolFileDWARF::ParseBlocksRecursive(Function &func) {
 size_t SymbolFileDWARF::ParseTypes(CompileUnit &comp_unit) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   size_t types_added = 0;
-  DWARFUnit *dwarf_cu = GetMainDWARFCompileUnit(&comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (dwarf_cu) {
     DWARFDIE dwarf_cu_die = dwarf_cu->DIE();
     if (dwarf_cu_die && dwarf_cu_die.HasChildren()) {
@@ -3147,7 +3146,7 @@ size_t SymbolFileDWARF::ParseVariablesForContext(const SymbolContext &sc) {
         return num_variables;
       }
     } else if (sc.comp_unit) {
-      DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit();
+      DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit();
       if (!main_unit)
         return 0;
       main_unit = &main_unit->GetNonSkeletonUnit();
@@ -3187,7 +3186,7 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc,
   if (!die)
     return nullptr;
 
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit();
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit();
 
   if (VariableSP var_sp = GetDIEToVariable()[die.MainCUtoDIEPair(main_unit)])
     return var_sp; // Already been parsed!
@@ -3585,7 +3584,7 @@ size_t SymbolFileDWARF::ParseVariables(const SymbolContext &sc,
     return 0;
 
   VariableListSP variable_list_sp;
-  DWARFCompileUnit *main_unit = sc.GetMainDWARFCompileUnit();
+  DWARFCompileUnit *main_unit = sc.GetDWARFCompileUnit();
 
   size_t vars_added = 0;
   DWARFDIE die = orig_die;
index 4b93095..4069b5d 100644 (file)
@@ -367,7 +367,7 @@ protected:
 
   lldb::CompUnitSP ParseCompileUnit(DWARFCompileUnit &dwarf_cu);
 
-  DWARFCompileUnit *GetMainDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) override;
+  DWARFCompileUnit *GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) override;
 
   DWARFUnit *GetNextUnparsedDWARFCompileUnit(DWARFUnit *prev_cu);
 
index 2ca2e72..9feeb07 100644 (file)
@@ -1447,8 +1447,8 @@ SymbolFileDWARFDebugMap::AddOSOARanges(SymbolFileDWARF *dwarf2Data,
   return num_line_entries_added;
 }
 
-DWARFCompileUnit *SymbolFileDWARFDebugMap::GetMainDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) {
+DWARFCompileUnit *SymbolFileDWARFDebugMap::GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) {
   if (!comp_unit)
     return nullptr;
-  return GetSymbolFile(*comp_unit)->GetMainDWARFCompileUnit(comp_unit);
+  return GetSymbolFile(*comp_unit)->GetDWARFCompileUnit(comp_unit);
 }
index c750654..e26e2a1 100644 (file)
@@ -377,7 +377,7 @@ protected:
   size_t AddOSOARanges(SymbolFileDWARF *dwarf2Data,
                        DWARFDebugAranges *debug_aranges);
 
-  DWARFCompileUnit *GetMainDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) override;
+  DWARFCompileUnit *GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) override;
 };
 
 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARFDEBUGMAP_H
index d22b867..325e156 100644 (file)
@@ -370,9 +370,9 @@ const FileSpecList &CompileUnit::GetSupportFiles() {
 
 void *CompileUnit::GetUserData() const { return m_user_data; }
 
-DWARFCompileUnit *CompileUnit::GetMainDWARFCompileUnit() {
+DWARFCompileUnit *CompileUnit::GetDWARFCompileUnit() {
   SymbolFile *symfile = GetModule()->GetSymbolFile();
   if (!symfile)
     return nullptr;
-  return symfile->GetMainDWARFCompileUnit(this);
+  return symfile->GetDWARFCompileUnit(this);
 }
index 28c501f..ed12696 100644 (file)
@@ -1324,7 +1324,7 @@ bool lldb_private::operator!=(const SymbolContextList &lhs,
   return !(lhs == rhs);
 }
 
-DWARFCompileUnit *SymbolContext::GetMainDWARFCompileUnit(SymbolFileDWARF **dwarf_return) const {
+DWARFCompileUnit *SymbolContext::GetDWARFCompileUnit(SymbolFileDWARF **dwarf_return) const {
   SymbolFileDWARF *dwarf = nullptr;
   if (module_sp)
     dwarf = llvm::dyn_cast<SymbolFileDWARF>(module_sp->GetSymbolFile());
@@ -1332,7 +1332,7 @@ DWARFCompileUnit *SymbolContext::GetMainDWARFCompileUnit(SymbolFileDWARF **dwarf
   if (comp_unit == nullptr)
     lldbassert(dwarf);
   else {
-    retval = comp_unit->GetMainDWARFCompileUnit();
+    retval = comp_unit->GetDWARFCompileUnit();
     if (dwarf)
       lldbassert(dwarf == &retval->GetSymbolFileDWARF());
     else