<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jun 17, 2013, at 2:32 PM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Mon, Jun 17, 2013 at 2:29 PM, Robinson, Paul<br><<a href="mailto:Paul_Robinson@playstation.sony.com">Paul_Robinson@playstation.sony.com</a>> wrote:<br><blockquote type="cite"><blockquote type="cite">From:<span class="Apple-converted-space"> </span><a href="mailto:cfe-commits-bounces@cs.uiuc.edu">cfe-commits-bounces@cs.uiuc.edu</a><span class="Apple-converted-space"> </span>[mailto:cfe-commits-<br><a href="mailto:bounces@cs.uiuc.edu">bounces@cs.uiuc.edu</a>] On Behalf Of Eric Christopher<br>Sent: Monday, June 10, 2013 4:05 PM<br>To: Adrian Prantl<br>Cc: Nadav Rotem;<span class="Apple-converted-space"> </span><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>Subject: Re: r183597 - Debug info: An if condition now creates a lexical<br>scope of its own.<br><br>On Mon, Jun 10, 2013 at 3:56 PM, Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>><br>wrote:<br><blockquote type="cite">(CC'ing John because he understands the intricacies of LexicalScope<br></blockquote>better than I do)<br><blockquote type="cite"><br>On the first glimpse LexicalScope appears to be a subclass of<br></blockquote>RunCleanupsScope that additionally emits a (DebugInfo-)LexicalScope. But<br>looking at the destructors it appears that they have slightly different<br>semantics: ~LexicalScope runs ForceCleanup and ~RunCleanupsScope<br>apparently doesn't.<br><blockquote type="cite"><br>I'm wary that switching to Lexicalscope in<br></blockquote>CodeGenFunction::EmitIfStmt() might lead to tricky ARC or EH-related<br>problems because of that.<br><blockquote type="cite"><br>Does anyone have an opinion on that?<br></blockquote><br>That bit was added here:<br><br>commit 495cfa46300979642acde8d93a1f21c9291dac98<br>Author: Nadav Rotem <<a href="mailto:nrotem@apple.com">nrotem@apple.com</a>><br>Date:   Sat Mar 23 06:43:35 2013 +0000<br><br>   Make clang to mark static stack allocations with lifetime markers<br>to enable a more aggressive stack coloring.<br>   Patch by John McCall with help by Shuxin Yang.<br>   <a href="rdar://13115369">rdar://13115369</a><br><br><br>and oddly not to RunCleanupsScope.<br><br>Nadav?<br><br>-eric<br></blockquote><br>Looks like ~LexicalScope() just wants RunCleanupsScope::ForceCleanup()<br>to happen before rescopeLabels().  All the right stuff happens in the right<br>order if you change the RunCleanupsScope instance to LexicalScope.<br>(RunCleanupsScope::ForceCleanup() does pretty much exactly the same thing<br>as ~RunCleanupsScope() so it works out.  It could be done in a more obvious<br>way, but functionally they're equivalent.)<br><br></blockquote><br>Agreed. I was just curious why Nadav changed one, but not the other.<br><br>Nadav? :)<br><br>-eric<br></div></blockquote></div><br><div><br></div><div>I don’t have a good answer.  I will have to consult with John who implemented this. </div><div><br></div></body></html>