<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></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 Feb 9, 2015, at 11:09 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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, Feb 9, 2015 at 11:07 AM, Frédéric Riss<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:friss@apple.com" target="_blank" class="">friss@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><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;"><span class=""><br class="">> On Feb 9, 2015, at 10:47 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:<br class="">><br class="">> Author: dblaikie<br class="">> Date: Mon Feb  9 12:47:14 2015<br class="">> New Revision: 228588<br class="">><br class="">> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=228588&view=rev" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=228588&view=rev</a><br class="">> Log:<br class="">> DebugInfo: Suppress the location of instructions in aggregate default arguments.<br class="">><br class="">> Matches the existing code for scalar default arguments. Complex default<br class="">> arguments probably need the same handling too (test/fix to that coming<br class="">> next).<br class=""><br class=""></span>What was the behavior before that? Was the location set to the declaration with the default argument description?</blockquote><div class=""><br class="">Yes<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;">I think I wouldn’t matter my debugger jumping there when the code actually does something non-trivial to initialize the argument(s).<br class=""></blockquote><div class=""><br class="">Perhaps - though it is a bit jarring whenever you step passed a std::string, std::vector, etc ctor and leap into the standard library header to see the Allocator() ctor call, then go back to your code.<br class=""></div></div></div></blockquote><div><br class=""></div><div>This is true, however from a purely semantic POV I think a ‘step’ should really get you there. I mostly asked out of curiosity, I’m not objecting to the change. I guess people could find it strange and that hiding the initialization is a sane choice (although remembering the developer that something non-trivial is happening here also has its advantages).</div><div><br class=""></div><blockquote type="cite" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><div class="">I do wonder if maybe the same is_stmt change we're discussing for dtors would be suitable here, so you don't step to it, but it does appear in the backtrace. Still awkward line table entry "foo() : basic_string:20473" or something - "wait, foo isn't in basic_string…".<br class=""></div></div></blockquote><div><br class=""></div><div>Not sure I’m totally following here. The basic_string code in foo() should appear as an inlined function, shouldn’t it?</div><div><br class=""></div><div>Fred</div><div><br class=""></div><blockquote type="cite" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><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="">Fred<br class=""><div class="HOEnZb"><div class="h5"><br class="">> Modified:<br class="">>    cfe/trunk/lib/CodeGen/CGExprAgg.cpp<br class="">>    cfe/trunk/test/CodeGenCXX/debug-info-line.cpp<br class="">><br class="">> Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp<br class="">> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=228588&r1=228587&r2=228588&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=228588&r1=228587&r2=228588&view=diff</a><br class="">> ==============================================================================<br class="">> --- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)<br class="">> +++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Mon Feb  9 12:47:14 2015<br class="">> @@ -1387,7 +1387,12 @@ void CodeGenFunction::EmitAggExpr(const<br class="">>   // Optimize the slot if possible.<br class="">>   CheckAggExprForMemSetUse(Slot, E, *this);<br class="">><br class="">> +  bool hasDebugInfo = getDebugInfo();<br class="">> +  if (isa<CXXDefaultArgExpr>(E))<br class="">> +    disableDebugInfo();<br class="">>   AggExprEmitter(*this, Slot).Visit(const_cast<Expr*>(E));<br class="">> +  if (isa<CXXDefaultArgExpr>(E) && hasDebugInfo)<br class="">> +    enableDebugInfo();<br class="">> }<br class="">><br class="">> LValue CodeGenFunction::EmitAggExprToLValue(const Expr *E) {<br class="">><br class="">> Modified: cfe/trunk/test/CodeGenCXX/debug-info-line.cpp<br class="">> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-line.cpp?rev=228588&r1=228587&r2=228588&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-line.cpp?rev=228588&r1=228587&r2=228588&view=diff</a><br class="">> ==============================================================================<br class="">> --- cfe/trunk/test/CodeGenCXX/debug-info-line.cpp (original)<br class="">> +++ cfe/trunk/test/CodeGenCXX/debug-info-line.cpp Mon Feb  9 12:47:14 2015<br class="">> @@ -274,6 +274,17 @@ void f22() {<br class="">>   }<br class="">> }<br class="">><br class="">> +// CHECK-LABEL: define<br class="">> +struct f23_struct {<br class="">> +};<br class="">> +f23_struct f23_a();<br class="">> +void f23_b(f23_struct = f23_a());<br class="">> +void f23() {<br class="">> +// CHECK: call {{.*}}f23_a{{.*}}, !dbg [[DBG_F23:![0-9]*]]<br class="">> +#line 2500<br class="">> +  f23_b();<br class="">> +}<br class="">> +<br class="">> // CHECK: [[DBG_F1]] = !MDLocation(line: 100,<br class="">> // CHECK: [[DBG_FOO_VALUE]] = !MDLocation(line: 200,<br class="">> // CHECK: [[DBG_FOO_REF]] = !MDLocation(line: 202,<br class="">> @@ -302,3 +313,4 @@ void f22() {<br class="">> // CHECK: [[DBG_F19_1]] = !MDLocation(line: 2100,<br class="">> // CHECK: [[DBG_F19_2]] = !MDLocation(line: 2101,<br class="">> // CHECK: [[DBG_F20_1]] = !MDLocation(line: 2200,<br class="">> +// CHECK: [[DBG_F23]] = !MDLocation(line: 2500,<br class="">><br class="">><br class="">> _______________________________________________<br class="">> cfe-commits mailing list<br class="">><span class="Apple-converted-space"> </span><a href="mailto:cfe-commits@cs.uiuc.edu" class="">cfe-commits@cs.uiuc.edu</a><br class="">><span class="Apple-converted-space"> </span><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a></div></div></blockquote></div></blockquote></div><br class=""></body></html>