Skip to content

Commit 4be1d5c

Browse files
committed
Remove dead function LLVMRustLinkInParsedExternalBitcode()
Refs #46437
1 parent 92189bc commit 4be1d5c

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

src/librustc_llvm/ffi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,6 @@ extern "C" {
16071607
pub fn LLVMRustSetNormalizedTarget(M: ModuleRef, triple: *const c_char);
16081608
pub fn LLVMRustAddAlwaysInlinePass(P: PassManagerBuilderRef, AddLifetimes: bool);
16091609
pub fn LLVMRustLinkInExternalBitcode(M: ModuleRef, bc: *const c_char, len: size_t) -> bool;
1610-
pub fn LLVMRustLinkInParsedExternalBitcode(M: ModuleRef, M: ModuleRef) -> bool;
16111610
pub fn LLVMRustRunRestrictionPass(M: ModuleRef, syms: *const *const c_char, len: size_t);
16121611
pub fn LLVMRustMarkAllFunctionsNounwind(M: ModuleRef);
16131612

src/rustllvm/RustWrapper.cpp

-17
Original file line numberDiff line numberDiff line change
@@ -927,23 +927,6 @@ extern "C" bool LLVMRustLinkInExternalBitcode(LLVMModuleRef DstRef, char *BC,
927927
return true;
928928
}
929929

930-
extern "C" bool LLVMRustLinkInParsedExternalBitcode(
931-
LLVMModuleRef DstRef, LLVMModuleRef SrcRef) {
932-
#if LLVM_VERSION_GE(4, 0)
933-
Module *Dst = unwrap(DstRef);
934-
std::unique_ptr<Module> Src(unwrap(SrcRef));
935-
936-
if (Linker::linkModules(*Dst, std::move(Src))) {
937-
LLVMRustSetLastError("failed to link modules");
938-
return false;
939-
}
940-
return true;
941-
#else
942-
LLVMRustSetLastError("can't link parsed modules on this LLVM");
943-
return false;
944-
#endif
945-
}
946-
947930
// Note that the two following functions look quite similar to the
948931
// LLVMGetSectionName function. Sadly, it appears that this function only
949932
// returns a char* pointer, which isn't guaranteed to be null-terminated. The

0 commit comments

Comments
 (0)