diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-07-18 11:37:56 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-07-18 11:37:56 -0700 |
| commit | 829bc268a9e3ef4d0f8ec4f6a2fadd604bdc7b8d (patch) | |
| tree | da726c4ce7fc1db6e818a6fa2d5921184641c088 /src/rustllvm/PassWrapper.cpp | |
| parent | 12ed235adc62e63b16bb4f715b143c37a5efa00d (diff) | |
| download | rust-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/rustllvm/PassWrapper.cpp')
| -rw-r--r-- | src/rustllvm/PassWrapper.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index a00ff3b345d..2f28c5b32fb 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -1228,15 +1228,6 @@ LLVMRustThinLTOPatchDICompileUnit(LLVMModuleRef Mod, DICompileUnit *Unit) { MD->addOperand(Unit); } -extern "C" void -LLVMRustThinLTORemoveAvailableExternally(LLVMModuleRef Mod) { - Module *M = unwrap(Mod); - for (Function &F : M->functions()) { - if (F.hasAvailableExternallyLinkage()) - F.deleteBody(); - } -} - #else extern "C" bool @@ -1328,9 +1319,4 @@ LLVMRustThinLTOPatchDICompileUnit(LLVMModuleRef Mod) { report_fatal_error("ThinLTO not available"); } -extern "C" void -LLVMRustThinLTORemoveAvailableExternally(LLVMModuleRef Mod) { - report_fatal_error("ThinLTO not available"); -} - #endif // LLVM_VERSION_GE(4, 0) |
