Remove SILExternalSource.

This was once used in lldb but no longer is. I'm cannot find any other
users, so I'm removing it as a small part of cleaning up and simplifying
the SIL linking process.
This commit is contained in:
Mark Lacey
2015-12-12 13:51:33 -08:00
parent c09845aa86
commit 4b0cb97590
5 changed files with 7 additions and 87 deletions

View File

@@ -14,7 +14,6 @@
#include "swift/SIL/SILModule.h"
#include "Linker.h"
#include "swift/SIL/SILDebugScope.h"
#include "swift/SIL/SILExternalSource.h"
#include "swift/SIL/SILVisitor.h"
#include "swift/Serialization/SerializedSILLoader.h"
#include "swift/SIL/SILValue.h"
@@ -44,9 +43,6 @@ namespace swift {
};
} // end namespace swift.
void SILExternalSource::anchor() {
}
/// SILTypeListUniquingType - This is the type of the folding set maintained by
/// SILModule that these things are uniqued into.
typedef llvm::FoldingSet<SILTypeList> SILTypeListUniquingType;
@@ -527,18 +523,15 @@ SILFunction *SILModule::lookUpFunction(SILDeclRef fnRef) {
}
bool SILModule::linkFunction(SILFunction *Fun, SILModule::LinkingMode Mode) {
return SILLinkerVisitor(*this, getSILLoader(), Mode, ExternalSource)
.processFunction(Fun);
return SILLinkerVisitor(*this, getSILLoader(), Mode).processFunction(Fun);
}
bool SILModule::linkFunction(SILDeclRef Decl, SILModule::LinkingMode Mode) {
return SILLinkerVisitor(*this, getSILLoader(), Mode, ExternalSource)
.processDeclRef(Decl);
return SILLinkerVisitor(*this, getSILLoader(), Mode).processDeclRef(Decl);
}
bool SILModule::linkFunction(StringRef Name, SILModule::LinkingMode Mode) {
return SILLinkerVisitor(*this, getSILLoader(), Mode, ExternalSource)
.processFunction(Name);
return SILLinkerVisitor(*this, getSILLoader(), Mode).processFunction(Name);
}
void SILModule::linkAllWitnessTables() {
@@ -598,8 +591,7 @@ SILVTable *SILModule::lookUpVTable(const ClassDecl *C) {
// If that fails, try to deserialize it. If that fails, return nullptr.
SILVTable *Vtbl =
SILLinkerVisitor(*this, getSILLoader(), SILModule::LinkingMode::LinkAll,
ExternalSource)
SILLinkerVisitor(*this, getSILLoader(), SILModule::LinkingMode::LinkAll)
.processClassDecl(C);
if (!Vtbl)
return nullptr;