Index: llvm/tools/dsymutil/MachODebugMapParser.cpp =================================================================== --- llvm/tools/dsymutil/MachODebugMapParser.cpp +++ llvm/tools/dsymutil/MachODebugMapParser.cpp @@ -496,8 +496,9 @@ uint64_t Addr = cantFail(Sym.getValue()); Expected Name = Sym.getName(); if (!Name) { - // TODO: Actually report errors helpfully. - consumeError(Name.takeError()); + auto Err = Name.takeError(); + Warning("failed to get symbol name: " + toString(std::move(Err)), + Obj.getFileName()); continue; } // The value of some categories of symbols isn't meaningful. For @@ -550,8 +551,9 @@ for (const auto &Sym : MainBinary.symbols()) { Expected TypeOrErr = Sym.getType(); if (!TypeOrErr) { - // TODO: Actually report errors helpfully. - consumeError(TypeOrErr.takeError()); + auto Err = TypeOrErr.takeError(); + Warning("failed to get symbol type: " + toString(std::move(Err)), + MainBinary.getFileName()); continue; } SymbolRef::Type Type = *TypeOrErr; @@ -570,8 +572,9 @@ bool Extern = SymType & (MachO::N_EXT | MachO::N_PEXT); Expected SectionOrErr = Sym.getSection(); if (!SectionOrErr) { - // TODO: Actually report errors helpfully. - consumeError(SectionOrErr.takeError()); + auto Err = TypeOrErr.takeError(); + Warning("failed to get symbol section: " + toString(std::move(Err)), + MainBinary.getFileName()); continue; } Section = *SectionOrErr; @@ -580,8 +583,9 @@ uint64_t Addr = cantFail(Sym.getValue()); Expected NameOrErr = Sym.getName(); if (!NameOrErr) { - // TODO: Actually report errors helpfully. - consumeError(NameOrErr.takeError()); + auto Err = NameOrErr.takeError(); + Warning("failed to get symbol name: " + toString(std::move(Err)), + MainBinary.getFileName()); continue; } StringRef Name = *NameOrErr;