<div dir="ltr">The _DEBUG idea doesn't work anyway because it's not defined on all platforms.  I think we should not be having NDEBUG in headers though.  NDEBUG should mean "it's ok to use asserts" not "it's ok to change a struct's layout".  <br></div><br><div class="gmail_quote">On Wed, Mar 4, 2015 at 1:17 PM rfoos <<a href="mailto:rfoos@codeaurora.org">rfoos@codeaurora.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Should _DEBUG be undefined in a release build as well?</div><div><br></div><div><br></div><div><div style="font-size:9px;color:#575757">Sent from my Verizon Wireless 4G LTE smartphone</div></div></div><div><br><br><div>-------- Original message --------</div><div>From: Zachary Turner <u></u> </div><div>Date:03/04/2015  2:02 PM  (GMT-06:00) </div><div>To: Reid Kleckner <u></u> </div><div>Cc: Commit Messages and Patches for LLVM <u></u> </div><div>Subject: Re: [llvm] r231214 - Revert "[ADT] fail-fast iterators for DenseMap" </div><div><br></div>I can confirm that removing the ABI incompatibility fixes the issue for me<br>locally.  I tested by commenting out the NDEBUG path in DebugEpochBase.h so<br>that it always used the debug path, and then rebuilding everything.<br><br>Can we change this to be _DEBUG instead of NDEBUG?<br><br>On Wed, Mar 4, 2015 at 11:42 AM Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:<br><br>> On Wed, Mar 4, 2015 at 9:43 AM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>><br>>> How necessary to this change is the ABI incompatibility between the cases<br>>> where NDEBUG is and isn't defined?  Is it possible to make them ABI<br>>> compatible while still keeping the meat of the change intact?<br>>><br>>> It doesn't really seem like a "nice" thing to do to require that people<br>>> who use LLVM as a library use the same compilation flags as LLVM.<br>>><br>><br>> Early in the history of LLVM, we allowed NDEBUG to control struct layout<br>> and general ABI. Then Alp Toker came along and decided this was a Bad<br>> Thing. He audited the headers and removed it all. Now it's crept back in.<br>><br>> In conclusion, what isn't tested will break.<br>><br></div></blockquote></div>