Open JohanEngelen opened 7 years ago
@kinke while working on this I got to these changes: https://github.com/JohanEngelen/ldc/commit/654aa25d0e0e8a68148bf66fe8ad686e021ca203 But... I don't think it's the right path. Perhaps we need to add location information onto a DValue and upon loading it we need to emit the debug location. That would solve a number of issues with debug location and then we only need to make sure we tag the instructions in-between loads.
I'm not familiar with the EmitStopPoint()
stuff. To be honest, I wouldn't even expect subexpressions not to be tied to the (first) LoC of their statement, but maybe that's just my experience with VS (I can't even say OTOH whether this works in VC++).
The line info on the
bar(1)
call insidefoo
is wrong:generates this LLVM IR:
Note the wrong
debug line = 5:5
on the call. (also on the+
)