about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/llvm
diff options
context:
space:
mode:
authorArlo Siemsen <arsiem@microsoft.com>2020-03-30 22:17:15 -0700
committerArlo Siemsen <arsiem@microsoft.com>2020-04-02 14:13:19 -0700
commitf86b078e2df79968e40185c91b0dce81bc580872 (patch)
tree18e3d3337427fa4105ede99f581124d3c97f3c31 /src/librustc_codegen_llvm/llvm
parent537ccdf3ac44c8c7a8d36cbdbe6fb224afabb7ae (diff)
Add hash of source files in debug info
* Adds either an MD5 or SHA1 hash to the debug info.
* Adds new unstable option `-Z src-hash-algorithm` to control the hashing algorithm.
Diffstat (limited to 'src/librustc_codegen_llvm/llvm')
-rw-r--r--src/librustc_codegen_llvm/llvm/ffi.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs
index 1d61d95cc6b..aeb34e5c9c9 100644
--- a/src/librustc_codegen_llvm/llvm/ffi.rs
+++ b/src/librustc_codegen_llvm/llvm/ffi.rs
@@ -546,6 +546,15 @@ pub enum ThreadLocalMode {
     LocalExec,
 }
 
+/// LLVMRustChecksumKind
+#[derive(Copy, Clone)]
+#[repr(C)]
+pub enum ChecksumKind {
+    None,
+    MD5,
+    SHA1,
+}
+
 extern "C" {
     type Opaque;
 }
@@ -1640,6 +1649,9 @@ extern "C" {
         FilenameLen: size_t,
         Directory: *const c_char,
         DirectoryLen: size_t,
+        CSKind: ChecksumKind,
+        Checksum: *const c_char,
+        ChecksumLen: size_t,
     ) -> &'a DIFile;
 
     pub fn LLVMRustDIBuilderCreateSubroutineType(