From e0ab5d5feb4eb2d8af11b8dd9446c2b45fada8af Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 16 Dec 2017 08:20:54 -0800 Subject: 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 --- src/librustc_llvm/ffi.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/librustc_llvm') 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); } -- cgit 1.4.1-3-g733a5