Use Span::is_dummy().

This commit is contained in:
Kyle Huey 2024-08-04 05:26:50 -07:00
parent 78caecf8f3
commit e587855538

View File

@ -570,7 +570,7 @@ impl<'ll, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
inlined_at: Option<&'ll DILocation>,
span: Span,
) -> &'ll DILocation {
let (line, col) = if span == DUMMY_SP && !self.sess().target.is_like_msvc {
let (line, col) = if span.is_dummy() && !self.sess().target.is_like_msvc {
(0, 0)
} else {
let DebugLoc { line, col, .. } = self.lookup_debug_loc(span.lo());