<div dir="ltr">Could you add/include a test case?</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Mar 21, 2017 at 1:57 PM Andrew Kelley via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">Index: lib/DebugInfo/DWARF/DWARFContext.cpp</div><div class="gmail_msg">===================================================================</div><div class="gmail_msg">--- lib/DebugInfo/DWARF/DWARFContext.cpp<span class="m_-1966862912142269380gmail-Apple-tab-span gmail_msg" style="white-space:pre-wrap"> </span>(revision 298436)</div><div class="gmail_msg">+++ lib/DebugInfo/DWARF/DWARFContext.cpp<span class="m_-1966862912142269380gmail-Apple-tab-span gmail_msg" style="white-space:pre-wrap"> </span>(working copy)</div><div class="gmail_msg">@@ -797,7 +797,7 @@</div><div class="gmail_msg"> }</div><div class="gmail_msg"> </div><div class="gmail_msg"> if (Address + R.Width > SectionSize) {</div><div class="gmail_msg">- errs() << "error: " << R.Width << "-byte relocation starting "</div><div class="gmail_msg">+ errs() << "error: " << format("%d", R.Width) << "-byte relocation starting "</div><div class="gmail_msg"> << Address << " bytes into section " << name << " which is "</div><div class="gmail_msg"> << SectionSize << " bytes long.\n";</div><div class="gmail_msg"> continue;</div><div class="gmail_msg"><br class="gmail_msg"></div></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">otherwise you can get something like this printed, because R.Width is of type `char`:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg">error: -byte relocation starting 179 bytes into section rela.debug_info which is 177 bytes long.</div></div><div class="gmail_msg"><br class="gmail_msg"></div></div>
_______________________________________________<br class="gmail_msg">
LLVM Developers mailing list<br class="gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
</blockquote></div>