[llvm] [ELFObject] Added dbgs() statement in removeSections() (PR #124692)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 02:57:12 PST 2025
================
@@ -2282,8 +2292,12 @@ Error Object::replaceSections(
Error Object::removeSymbols(function_ref<bool(const Symbol &)> ToRemove) {
if (SymbolTable)
for (const SecPtr &Sec : Sections)
- if (Error E = Sec->removeSymbols(ToRemove))
+ if (Error E = Sec->removeSymbols(ToRemove)) {
+ if (isVerboseEnabled) {
+ llvm::outs() << "Removed Symbols:" << Sec->Name;
+ }
----------------
jh7370 wrote:
This is incorrect here. `Error` is treated as `true` if there was an error, so all this is doing is "if there was an error when trying to run `removeSymbols` on a section, print "Removed Symbols: \<section name\>" which is clearly not correct.
What are you trying to achieve with this part of the change?
https://github.com/llvm/llvm-project/pull/124692
More information about the llvm-commits
mailing list