about summary refs log tree commit diff
path: root/src/librustc_llvm
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-12-16 08:20:54 -0800
committerAlex Crichton <alex@alexcrichton.com>2017-12-18 11:44:00 -0800
commite0ab5d5feb4eb2d8af11b8dd9446c2b45fada8af (patch)
treea502ff2d52a8329aa843e13780e95db3ad24625a /src/librustc_llvm
parenta3a7203e2c9ed30a501da86f3fa1f9efe707ac94 (diff)
downloadrust-e0ab5d5feb4eb2d8af11b8dd9446c2b45fada8af.tar.gz
rust-e0ab5d5feb4eb2d8af11b8dd9446c2b45fada8af.zip
rustc: Work around `DICompileUnit` bugs in LLVM
This commit implements a workaround for #46346 which basically just
avoids triggering the situation that LLVM's bug
https://bugs.llvm.org/show_bug.cgi?id=35562 arises. More details can be
found in the code itself but this commit is also intended to ...

Closes #46346
Diffstat (limited to 'src/librustc_llvm')
-rw-r--r--src/librustc_llvm/ffi.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_llvm/ffi.rs b/src/librustc_llvm/ffi.rs
index 1c2fa1bbb48..cb385923067 100644
--- a/src/librustc_llvm/ffi.rs
+++ b/src/librustc_llvm/ffi.rs
@@ -1728,4 +1728,8 @@ extern "C" {
         Identifier: *const c_char,
     ) -> ModuleRef;
     pub fn LLVMGetModuleIdentifier(M: ModuleRef, size: *mut usize) -> *const c_char;
+    pub fn LLVMRustThinLTOGetDICompileUnit(M: ModuleRef,
+                                           CU1: *mut *mut c_void,
+                                           CU2: *mut *mut c_void);
+    pub fn LLVMRustThinLTOPatchDICompileUnit(M: ModuleRef, CU: *mut c_void);
 }