Skip to content

Commit 3aac9a3

Browse files
committed
Remove LLVM 18 inline ASM span fallback
1 parent c211076 commit 3aac9a3

File tree

1 file changed

+2
-5
lines changed
  • compiler/rustc_codegen_llvm/src/back

1 file changed

+2
-5
lines changed

Diff for: compiler/rustc_codegen_llvm/src/back/write.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,9 @@ fn report_inline_asm(
439439
let span = if cookie == 0 || matches!(cgcx.lto, Lto::Fat | Lto::Thin) {
440440
SpanData::default()
441441
} else {
442-
let lo = BytePos::from_u32(cookie as u32);
443-
let hi = BytePos::from_u32((cookie >> 32) as u32);
444442
SpanData {
445-
lo,
446-
// LLVM version < 19 silently truncates the cookie to 32 bits in some situations.
447-
hi: if hi.to_u32() != 0 { hi } else { lo },
443+
lo: BytePos::from_u32(cookie as u32),
444+
hi: BytePos::from_u32((cookie >> 32) as u32),
448445
ctxt: SyntaxContext::root(),
449446
parent: None,
450447
}

0 commit comments

Comments
 (0)