<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 Nov 2, 2016, at 1:44 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" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; 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;" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Nov 2, 2016 at 1:38 PM Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">aprantl added a comment.<br class="gmail_msg"><br class="gmail_msg">In<span class="Apple-converted-space"> </span><a href="https://reviews.llvm.org/D26256#586228" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D26256#586228</a>, @rob.lougher wrote:<br class="gmail_msg"><br class="gmail_msg">> In<span class="Apple-converted-space"> </span><a href="https://reviews.llvm.org/D26256#586214" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D26256#586214</a>, @aprantl wrote:<br class="gmail_msg">><br class="gmail_msg">> > Shouldn't it only drop the location if the two locations are distinct (and perhaps add a discriminator)?<br class="gmail_msg">><br class="gmail_msg">><br class="gmail_msg">> Sorry, didn't make myself clear in the last comment.  As the two instructions feed into a phi node they are in different basic-blocks, so the two locations must be distinct (they are in different scopes and will have different discriminators).   But in the case where we have an if-then-else all on the same line we could create a new debug location with a different scope/discriminator.<br class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg">Yes, that sounds reasonable.<br class="gmail_msg"><br class="gmail_msg">I think the single-line situation is not just an edge case and we should handle it correctly. In C++11 it is becoming quite common to have a lot of control flow on a single line (think anything from <algorithm> with lambdas or the ternary operator).<br class="gmail_msg"></blockquote><div class=""><br class=""></div><div class="">I'm not sure how practical it is to find the right scope to tie this in to... (at least not obvious to me off the cuff) nor how much it'd help the debugging experience to have this info. But I'm not too invested either way.<br class=""></div></div></div></div></blockquote><div><br class=""></div>Hmm, algorithm/lambda is an example for control flow being on one line, but you are right that it does not apply to the situation in this review. The ternary operator is a better example.</div><div><br class=""></div><div>-- adrian<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; 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;" class=""><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><br class="gmail_msg"><br class="gmail_msg"><a href="https://reviews.llvm.org/D26256" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D26256</a></blockquote></div></div></div></blockquote></div><br class=""></body></html>