[PATCH] D101072: [lld] reformat multi-line error messages in source code

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 08:12:16 PDT 2021


thakis created this revision.
thakis added a reviewer: MaskRay.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: int3.
Herald added a project: lld-macho.
Herald added a reviewer: lld-macho.
thakis requested review of this revision.

This reformats multi-line error messages to look more alike when
printed and in source code. (It does _not_ modify lld's output, it
just changes how the code looks.)

I think this looks nicer. The drawback is that clang-format insists on putting
the "\n" on its own line. Maybe this not being clang-format-compliant is fine
and the increase in readability is worth it, or maybe the increase in
readability is too small to make up for the annoyance of clang-format not Just
Working. I kind of like how this looks right now, but I can also see the
drawback. Sending this out, and unless everyone thinks this is good, then let's
not land it :) (I'll wait for comments for a week or so.)

Also make an /lldmap warning not use the >>> style since it seems
inappropriate there. No other behavior change.


https://reviews.llvm.org/D101072

Files:
  lld/COFF/Driver.cpp
  lld/COFF/DriverUtils.cpp
  lld/ELF/EhFrame.cpp
  lld/ELF/InputSection.cpp
  lld/ELF/OutputSections.cpp
  lld/ELF/Symbols.cpp
  lld/ELF/Symbols.h
  lld/MachO/Driver.cpp
  lld/MachO/SymbolTable.cpp
  lld/MachO/SyntheticSections.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101072.339644.patch
Type: text/x-patch
Size: 7602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210422/ce11245e/attachment.bin>


More information about the llvm-commits mailing list