<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 6, 2017, at 2:21 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Mar 6, 2017 at 1:17 PM Adrian Prantl via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: adrian<br class="gmail_msg">
Date: Mon Mar  6 15:05:14 2017<br class="gmail_msg">
New Revision: 297072<br class="gmail_msg">
<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=297072&view=rev" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=297072&view=rev</a><br class="gmail_msg">
Log:<br class="gmail_msg">
Verifier: Change Assert to AssertDI.<br class="gmail_msg">
This error can be recovered from by stripping debug info.<br class="gmail_msg">
This is NFC for +asserts builds.<br class="gmail_msg"></blockquote><div class=""><br class=""></div><div class="">Is there no way in a +Asserts build to get the behavior of "if debug info doesn't verify, strip it"? That seems... bad (untestable codepath that someone's relying on?).</div></div></div></div></blockquote><div><br class=""></div><div>The behavior is still there, but the assertion fires first :-)</div><div>We treat debug info verification errors as recoverable by stripping the debug info. But when assertions are enabled, we assert that even the debug info is correct. This allows us to find, e.g., bitcode upgrade bugs with asserts-enabled compilers during compiler qualification.</div><div><br class=""></div>It is true that we cannot test the stripping behavior with assertions enabled. I had a vague memory that there was a command line option to force the noasserts behavior for some tools, but I must have misremembered or didn't find it.</div><div><br class=""></div><div>-- adrian<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
Modified:<br class="gmail_msg">
    llvm/trunk/lib/IR/Verifier.cpp<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/lib/IR/Verifier.cpp<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=297072&r1=297071&r2=297072&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=297072&r1=297071&r2=297072&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/lib/IR/Verifier.cpp (original)<br class="gmail_msg">
+++ llvm/trunk/lib/IR/Verifier.cpp Mon Mar  6 15:05:14 2017<br class="gmail_msg">
@@ -2734,9 +2734,9 @@ void Verifier::verifyCallSite(CallSite C<br class="gmail_msg">
   // do so causes assertion failures when the inliner sets up inline scope info.<br class="gmail_msg">
   if (I->getFunction()->getSubprogram() && CS.getCalledFunction() &&<br class="gmail_msg">
       CS.getCalledFunction()->getSubprogram())<br class="gmail_msg">
-    Assert(I->getDebugLoc(), "inlinable function call in a function with debug "<br class="gmail_msg">
-                             "info must have a !dbg location",<br class="gmail_msg">
-           I);<br class="gmail_msg">
+    AssertDI(I->getDebugLoc(), "inlinable function call in a function with "<br class="gmail_msg">
+                               "debug info must have a !dbg location",<br class="gmail_msg">
+             I);<br class="gmail_msg">
<br class="gmail_msg">
   visitInstruction(*I);<br class="gmail_msg">
 }<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote></div></div>
</div></blockquote></div><br class=""></body></html>