[llvm] [llvm-gsymutil] Print one-time DWO file missing warning under --quiet flag (PR #79882)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 15:56:59 PST 2024
================
@@ -537,17 +537,27 @@ void DwarfTransformer::handleDie(raw_ostream *OS, CUInfo &CUI, DWARFDie Die) {
Error DwarfTransformer::convert(uint32_t NumThreads, raw_ostream *OS) {
size_t NumBefore = Gsym.getNumFunctionInfos();
+ std::once_flag flag;
auto getDie = [&](DWARFUnit &DwarfUnit) -> DWARFDie {
DWARFDie ReturnDie = DwarfUnit.getUnitDIE(false);
if (DwarfUnit.getDWOId()) {
DWARFUnit *DWOCU = DwarfUnit.getNonSkeletonUnitDIE(false).getDwarfUnit();
- if (OS && !DWOCU->isDWOUnit()) {
- std::string DWOName = dwarf::toString(
- DwarfUnit.getUnitDIE().find(
- {dwarf::DW_AT_dwo_name, dwarf::DW_AT_GNU_dwo_name}),
- "");
- *OS << "warning: Unable to retrieve DWO .debug_info section for "
- << DWOName << "\n";
+ if (!DWOCU->isDWOUnit()) {
----------------
kusmour wrote:
It seems the `--verbose` is only used for lookups. We will need to expose that option (the same way as `--quiet`) to `Transformer` level. If we want to go this path I will do it in a separate patch. Let's focus on the changing the `--quiet` behavior here :D
https://github.com/llvm/llvm-project/pull/79882
More information about the llvm-commits
mailing list