================
@@ -683,6 +683,34 @@ uint64_t SectionList::GetDebugInfoSize() const {
   return debug_info_size;
 }
 
+std::shared_ptr<SectionList>
+SectionList::Merge(SectionList &lhs, SectionList &rhs, MergeCallback filter) {
+  std::shared_ptr<SectionList> output_sp = std::make_shared<SectionList>();
+
+  // Iterate through all the sections in lhs and see if we have matches in
+  // the rhs list.
+  for (const auto &lhs_section : lhs) {
+    auto rhs_section = rhs.FindSectionByName(lhs_section->GetName());
+    if (rhs_section) {
+      assert(lhs_section->GetName() == rhs_section->GetName());
----------------
clayborg wrote:

You can remove the assert here, we just found the section by name on line 693

https://github.com/llvm/llvm-project/pull/166635
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to