mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Add a comment.
This commit is contained in:
parent
3c735a00f7
commit
4e9725cd2f
@ -570,6 +570,11 @@ impl<'ll, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
||||
inlined_at: Option<&'ll DILocation>,
|
||||
span: Span,
|
||||
) -> &'ll DILocation {
|
||||
// When emitting debugging information, DWARF (i.e. everything but MSVC)
|
||||
// treats line 0 as a magic value meaning that the code could not be
|
||||
// attributed to any line in the source. That's also exactly what dummy
|
||||
// spans are. Make that equivalence here, rather than passing dummy spans
|
||||
// to lookup_debug_loc, which will return line 1 for them.
|
||||
let (line, col) = if span.is_dummy() && !self.sess().target.is_like_msvc {
|
||||
(0, 0)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user