[llvm] [llvm-symbolizer] Improve error messages for filter symbolization failure (PR #114649)

Daniel Thornburgh via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 10:54:19 PST 2024


================
@@ -698,6 +695,24 @@ void MarkupFilter::reportLocation(StringRef::iterator Loc) const {
   errs() << '\n';
 }
 
+void MarkupFilter::symbolizeFailure(const MarkupNode &Node, const Module *Mod,
+                                    Error SymbolizeError) {
+  if (Mod) {
+    auto add_module_info = [Mod](std::unique_ptr<StringError> SE) -> Error {
+      return createStringError(
+          SE->getMessage() +
+              formatv(" for ELF module #{0:x} \"{1}\"; BuildID=", Mod->ID,
----------------
mysterymath wrote:

nit: At least to me, the mixture of concatenation and formatv would be easier to read as a single formatv call.

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


More information about the llvm-commits mailing list