Remove unused callback from SIL linker.

This was once used to maintain the call graph when lazy linking was
happening, but all that is gone now.
This commit is contained in:
Mark Lacey
2015-12-10 13:48:46 -08:00
parent 5d1c6e16a0
commit b37bc91506
4 changed files with 21 additions and 54 deletions

View File

@@ -526,22 +526,19 @@ SILFunction *SILModule::lookUpFunction(SILDeclRef fnRef) {
return lookUpFunction(name);
}
bool SILModule::linkFunction(SILFunction *Fun, SILModule::LinkingMode Mode,
std::function<void(SILFunction *)> Callback) {
return SILLinkerVisitor(*this, getSILLoader(), Mode,
ExternalSource, Callback).processFunction(Fun);
bool SILModule::linkFunction(SILFunction *Fun, SILModule::LinkingMode Mode) {
return SILLinkerVisitor(*this, getSILLoader(), Mode, ExternalSource)
.processFunction(Fun);
}
bool SILModule::linkFunction(SILDeclRef Decl, SILModule::LinkingMode Mode,
std::function<void(SILFunction *)> Callback) {
return SILLinkerVisitor(*this, getSILLoader(), Mode,
ExternalSource, Callback).processDeclRef(Decl);
bool SILModule::linkFunction(SILDeclRef Decl, SILModule::LinkingMode Mode) {
return SILLinkerVisitor(*this, getSILLoader(), Mode, ExternalSource)
.processDeclRef(Decl);
}
bool SILModule::linkFunction(StringRef Name, SILModule::LinkingMode Mode,
std::function<void(SILFunction *)> Callback) {
return SILLinkerVisitor(*this, getSILLoader(), Mode,
ExternalSource, Callback).processFunction(Name);
bool SILModule::linkFunction(StringRef Name, SILModule::LinkingMode Mode) {
return SILLinkerVisitor(*this, getSILLoader(), Mode, ExternalSource)
.processFunction(Name);
}
void SILModule::linkAllWitnessTables() {
@@ -590,8 +587,7 @@ void SILModule::eraseGlobalVariable(SILGlobalVariable *G) {
getSILGlobalList().erase(G);
}
SILVTable *SILModule::lookUpVTable(const ClassDecl *C,
std::function<void(SILFunction *)> Callback) {
SILVTable *SILModule::lookUpVTable(const ClassDecl *C) {
if (!C)
return nullptr;
@@ -601,10 +597,10 @@ SILVTable *SILModule::lookUpVTable(const ClassDecl *C,
return R->second;
// If that fails, try to deserialize it. If that fails, return nullptr.
SILVTable *Vtbl = SILLinkerVisitor(*this, getSILLoader(),
SILModule::LinkingMode::LinkAll,
ExternalSource,
Callback).processClassDecl(C);
SILVTable *Vtbl =
SILLinkerVisitor(*this, getSILLoader(), SILModule::LinkingMode::LinkAll,
ExternalSource)
.processClassDecl(C);
if (!Vtbl)
return nullptr;