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

@@ -64,9 +64,6 @@ bool SILLinkerVisitor::processFunction(SILFunction *F) {
if (!NewFn || NewFn->isExternalDeclaration())
return false;
if (Callback)
Callback(NewFn);
F = NewFn;
}
@@ -98,10 +95,6 @@ bool SILLinkerVisitor::processDeclRef(SILDeclRef Decl) {
return false;
}
// Notify client of new deserialized function.
if (Callback)
Callback(NewFn);
++NumFuncLinked;
// Try to transitively deserialize everything referenced by NewFn.
@@ -123,10 +116,6 @@ bool SILLinkerVisitor::processFunction(StringRef Name) {
if (!NewFn || NewFn->isExternalDeclaration())
return false;
// Notify client of new deserialized function.
if (Callback)
Callback(NewFn);
++NumFuncLinked;
// Try to transitively deserialize everything referenced by NewFn.
@@ -168,7 +157,7 @@ SILVTable *SILLinkerVisitor::processClassDecl(const ClassDecl *C) {
bool SILLinkerVisitor::linkInVTable(ClassDecl *D) {
// Attempt to lookup the Vtbl from the SILModule.
SILVTable *Vtbl = Mod.lookUpVTable(D, Callback);
SILVTable *Vtbl = Mod.lookUpVTable(D);
// If the SILModule does not have the VTable, attempt to deserialize the
// VTable. If we fail to do that as well, bail.
@@ -372,10 +361,6 @@ bool SILLinkerVisitor::process() {
NewFn->verify();
Worklist.push_back(NewFn);
// Notify client of new deserialized function.
if (Callback)
Callback(NewFn);
++NumFuncLinked;
Result = true;
continue;
@@ -395,10 +380,6 @@ bool SILLinkerVisitor::process() {
Worklist.push_back(NewFn);
Result = true;
// Notify client of new deserialized function.
if (Callback)
Callback(NewFn);
++NumFuncLinked;
}
}