Skip to content

Commit 5012354

Browse files
authored
Rollup merge of rust-lang#139431 - beetrees:no-llvm-18, r=jieyouxu
Remove LLVM 18 inline ASM span fallback The minimum supported LLVM version is now 19, so this fallback is no longer required.
2 parents f4177f4 + 3aac9a3 commit 5012354

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)