diff options
author | bors <bors@rust-lang.org> | 2018-07-13 22:06:38 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2018-07-13 22:06:38 +0000 |
commit | a14a361c2c80fdcd0270766e0bd57104e608988e (patch) | |
tree | b99e7d5c2a0ea280dd37ed069907b86e3ca05af9 /src/librustc_llvm | |
parent | 254f8796b729810846e2b97620032ecaf103db33 (diff) | |
parent | e045a6cd8c0235a26ef11e6cd9a13ebd817f1265 (diff) | |
download | rust-a14a361c2c80fdcd0270766e0bd57104e608988e.tar.gz |
Auto merge of #52266 - michaelwoerister:incr-thinlto-preliminaries, r=alexcrichton
Preliminary work for incremental ThinLTO.
Since implementing incremental ThinLTO is a bit more involved than I initially thought, I'm splitting out some of the things that already work. This PR (1) adds a way accessing some ThinLTO information in `rustc` and (2) does some cleanup around CGU/object file naming (which makes things quite a bit nicer).
This is probably best reviewed one commit at a time.
Diffstat (limited to 'src/librustc_llvm')
-rw-r--r-- | src/librustc_llvm/ffi.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/librustc_llvm/ffi.rs b/src/librustc_llvm/ffi.rs index 0497de940ca..551f1cda6f0 100644 --- a/src/librustc_llvm/ffi.rs +++ b/src/librustc_llvm/ffi.rs @@ -350,6 +350,10 @@ pub enum ThinLTOData {} /// LLVMRustThinLTOBuffer pub enum ThinLTOBuffer {} +// LLVMRustModuleNameCallback +pub type ThinLTOModuleNameCallback = + unsafe extern "C" fn(*mut c_void, *const c_char, *const c_char); + /// LLVMRustThinLTOModule #[repr(C)] pub struct ThinLTOModule { @@ -1778,6 +1782,11 @@ extern "C" { Data: *const ThinLTOData, Module: ModuleRef, ) -> bool; + pub fn LLVMRustGetThinLTOModuleImports( + Data: *const ThinLTOData, + ModuleNameCallback: ThinLTOModuleNameCallback, + CallbackPayload: *mut c_void, + ); pub fn LLVMRustFreeThinLTOData(Data: *mut ThinLTOData); pub fn LLVMRustParseBitcodeForThinLTO( Context: ContextRef, |