[PATCH] D120377: [lld-macho] Implement -why_live (without perf overhead)
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 23 06:57:09 PST 2022
thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.
Neat!
================
Comment at: lld/MachO/MarkLive.cpp:111
+ if (!symbols.empty())
+ lld::errs() << std::string(indent, ' ') << toString(*symbols.front())
+ << " from " << toString(symbols.front()->getFile()) << "\n";
----------------
can you add a comment on why this doesn't use message()?
================
Comment at: lld/MachO/MarkLive.cpp:114
}
+ lld::errs().flush();
+}
----------------
errs() is unbuffered by default, no?
================
Comment at: lld/MachO/MarkLive.cpp:187
+ referentIsec = d->isec;
+ enqueue(isec, 0, makeEntry(referentIsec, nullptr));
+ }
----------------
Do you want a `makeEntry(nullptr, nullptr)` for Undefineds here, or a `nullptr`?
Hm, I guess an Undefined never has relocs. Do we always have a Defined here? If so, we should probably just `cast<>` without conditional.
If there are non-Undefined non-Defined cases, the original question if you want `makeEntry(nullptr, nullptr)` stands for that :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120377/new/
https://reviews.llvm.org/D120377
More information about the llvm-commits
mailing list