Remove LLVM 18 inline ASM span fallback

This commit is contained in:
beetrees 2025-04-06 02:31:52 +01:00
parent c2110769cd
commit 3aac9a37a5
No known key found for this signature in database
GPG key ID: 8791BD754191EBD6

View file

@ -439,12 +439,9 @@ fn report_inline_asm(
let span = if cookie == 0 || matches!(cgcx.lto, Lto::Fat | Lto::Thin) {
SpanData::default()
} else {
let lo = BytePos::from_u32(cookie as u32);
let hi = BytePos::from_u32((cookie >> 32) as u32);
SpanData {
lo,
// LLVM version < 19 silently truncates the cookie to 32 bits in some situations.
hi: if hi.to_u32() != 0 { hi } else { lo },
lo: BytePos::from_u32(cookie as u32),
hi: BytePos::from_u32((cookie >> 32) as u32),
ctxt: SyntaxContext::root(),
parent: None,
}