about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/debuginfo
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-11-02 14:53:30 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-11-02 14:53:30 +0000
commit60f0cd87e80bc227595d4c42860e3c7ec94ca35f (patch)
treea93a94318886f05984ddd24ee7e41354943e7911 /compiler/rustc_codegen_cranelift/src/debuginfo
parent588a4203508ed7c76750c96b482641261630ed36 (diff)
parent5b1246bb4bed72fd0bb8fa497d8e5ed2c7f3515c (diff)
downloadrust-60f0cd87e80bc227595d4c42860e3c7ec94ca35f.tar.gz
rust-60f0cd87e80bc227595d4c42860e3c7ec94ca35f.zip
Merge commit '5b1246bb4bed72fd0bb8fa497d8e5ed2c7f3515c' into sync_cg_clif-2024-11-02
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/debuginfo')
-rw-r--r--compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs7
-rw-r--r--compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs3
-rw-r--r--compiler/rustc_codegen_cranelift/src/debuginfo/unwind.rs4
3 files changed, 10 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs
index c3d9d635084..fa7b39c836f 100644
--- a/compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs
+++ b/compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs
@@ -50,7 +50,12 @@ fn make_file_info(hash: SourceFileHash) -> Option<FileInfo> {
     if hash.kind == SourceFileHashAlgorithm::Md5 {
         let mut buf = [0u8; MD5_LEN];
         buf.copy_from_slice(hash.hash_bytes());
-        Some(FileInfo { timestamp: 0, size: 0, md5: buf })
+        Some(FileInfo {
+            timestamp: 0,
+            size: 0,
+            md5: buf,
+            source: None, // FIXME implement -Zembed-source
+        })
     } else {
         None
     }
diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
index 79d76925df9..78ae43b1c4d 100644
--- a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
+++ b/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
@@ -101,6 +101,7 @@ impl DebugContext {
             None => (tcx.crate_name(LOCAL_CRATE).to_string(), None),
         };
 
+        let file_has_md5 = file_info.is_some();
         let mut line_program = LineProgram::new(
             encoding,
             LineEncoding::default(),
@@ -108,7 +109,7 @@ impl DebugContext {
             LineString::new(name.as_bytes(), encoding, &mut dwarf.line_strings),
             file_info,
         );
-        line_program.file_has_md5 = file_info.is_some();
+        line_program.file_has_md5 = file_has_md5;
 
         dwarf.unit.line_program = line_program;
 
diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/unwind.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/unwind.rs
index 9399230f292..362333d35a4 100644
--- a/compiler/rustc_codegen_cranelift/src/debuginfo/unwind.rs
+++ b/compiler/rustc_codegen_cranelift/src/debuginfo/unwind.rs
@@ -60,8 +60,8 @@ impl UnwindContext {
                 self.frame_table
                     .add_fde(self.cie_id.unwrap(), unwind_info.to_fde(address_for_func(func_id)));
             }
-            UnwindInfo::WindowsX64(_) => {
-                // FIXME implement this
+            UnwindInfo::WindowsX64(_) | UnwindInfo::WindowsArm64(_) => {
+                // Windows does not have debug info for its unwind info.
             }
             unwind_info => unimplemented!("{:?}", unwind_info),
         }