[llvm-dev] minor error message fix patch
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Wed Mar 22 08:30:47 PDT 2017
Could you add/include a test case?
On Tue, Mar 21, 2017 at 1:57 PM Andrew Kelley via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Index: lib/DebugInfo/DWARF/DWARFContext.cpp
> ===================================================================
> --- lib/DebugInfo/DWARF/DWARFContext.cpp (revision 298436)
> +++ lib/DebugInfo/DWARF/DWARFContext.cpp (working copy)
> @@ -797,7 +797,7 @@
> }
>
> if (Address + R.Width > SectionSize) {
> - errs() << "error: " << R.Width << "-byte relocation starting "
> + errs() << "error: " << format("%d", R.Width) << "-byte
> relocation starting "
> << Address << " bytes into section " << name << " which
> is "
> << SectionSize << " bytes long.\n";
> continue;
>
>
>
> otherwise you can get something like this printed, because R.Width is of
> type `char`:
>
> error: -byte relocation starting 179 bytes into section rela.debug_info
> which is 177 bytes long.
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170322/8ddb226f/attachment.html>
More information about the llvm-dev
mailing list