about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/back/lto.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-07-18 11:37:56 -0700
committerAlex Crichton <alex@alexcrichton.com>2018-07-18 11:37:56 -0700
commit829bc268a9e3ef4d0f8ec4f6a2fadd604bdc7b8d (patch)
treeda726c4ce7fc1db6e818a6fa2d5921184641c088 /src/librustc_codegen_llvm/back/lto.rs
parent12ed235adc62e63b16bb4f715b143c37a5efa00d (diff)
downloadrust-829bc268a9e3ef4d0f8ec4f6a2fadd604bdc7b8d.tar.gz
rust-829bc268a9e3ef4d0f8ec4f6a2fadd604bdc7b8d.zip
rustc: Remove a workaroudn in ThinLTO fixed upstream
This commit removes a hack in our ThinLTO passes which removes available
externally functions manually. The [upstream bug][1] has long since been fixed,
so we should be able to rely on LLVM natively for this now!

[1]: https://bugs.llvm.org/show_bug.cgi?id=35736
Diffstat (limited to 'src/librustc_codegen_llvm/back/lto.rs')
-rw-r--r--src/librustc_codegen_llvm/back/lto.rs14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/librustc_codegen_llvm/back/lto.rs b/src/librustc_codegen_llvm/back/lto.rs
index a33f8b569d0..60b5cf2ec76 100644
--- a/src/librustc_codegen_llvm/back/lto.rs
+++ b/src/librustc_codegen_llvm/back/lto.rs
@@ -759,20 +759,6 @@ impl ThinModule {
         cgcx.save_temp_bitcode(&module, "thin-lto-after-pm");
         timeline.record("thin-done");
 
-        // FIXME: this is a hack around a bug in LLVM right now. Discovered in
-        // #46910 it was found out that on 32-bit MSVC LLVM will hit a codegen
-        // error if there's an available_externally function in the LLVM module.
-        // Typically we don't actually use these functions but ThinLTO makes
-        // heavy use of them when inlining across modules.
-        //
-        // Tracked upstream at https://bugs.llvm.org/show_bug.cgi?id=35736 this
-        // function call (and its definition on the C++ side of things)
-        // shouldn't be necessary eventually and we can safetly delete these few
-        // lines.
-        llvm::LLVMRustThinLTORemoveAvailableExternally(llmod);
-        cgcx.save_temp_bitcode(&module, "thin-lto-after-rm-ae");
-        timeline.record("no-ae");
-
         Ok(module)
     }
 }