about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/write.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-04-10 12:50:10 +0000
committerGitHub <noreply@github.com>2025-04-10 12:50:10 +0000
commit1347cc8f15f6d3ceae035f7226150da7ddcd83b8 (patch)
tree351b40fa66750fb4eac0449318a360cf1167efd3 /compiler/rustc_codegen_llvm/src/back/write.rs
parent7da44400129c51c314eccdc0e703e99502b78c1a (diff)
parentf69ea4d82fdbf0fefc36118071bb69ec6253a285 (diff)
downloadrust-1347cc8f15f6d3ceae035f7226150da7ddcd83b8.tar.gz
rust-1347cc8f15f6d3ceae035f7226150da7ddcd83b8.zip
Merge pull request #4264 from RalfJung/rustup
Rustup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/write.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/write.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs
index bf6138142b6..76d431a4975 100644
--- a/compiler/rustc_codegen_llvm/src/back/write.rs
+++ b/compiler/rustc_codegen_llvm/src/back/write.rs
@@ -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,
         }