[llvm] [ELFObject] Added dbgs() statement in removeSections() (PR #124692)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 00:24:05 PST 2025


================
@@ -2249,10 +2255,18 @@ Error Object::removeSections(
 
   // Transfer removed sections into the Object RemovedSections container for use
   // later.
-  std::move(Iter, Sections.end(), std::back_inserter(RemovedSections));
-  // Now finally get rid of them all together.
-  Sections.erase(Iter, std::end(Sections));
-  return Error::success();
+  for(auto &KeepSec : make_range(std::begin(Sections) , Iter))
----------------
jh7370 wrote:

I'm not sure what you're doing here, but it looks like you've duplicated a load of irrelevant code?

https://github.com/llvm/llvm-project/pull/124692


More information about the llvm-commits mailing list