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
This commit is contained in:
Alex Crichton 2018-07-18 11:37:56 -07:00
parent 12ed235adc
commit 829bc268a9
3 changed files with 0 additions and 29 deletions

View file

@ -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)