[Index/SourceKit] Remove the code related to calculating a module hash from the indexing walker

This has been an unnecessary code path for a long time now and should be removed particularly because it triggers wasteful `stat` calls.

rdar://51523161
This commit is contained in:
Argyrios Kyrtzidis
2019-06-21 17:09:12 -07:00
parent 747c69c1ba
commit 3332b37d00
30 changed files with 477 additions and 495 deletions

View File

@@ -50,14 +50,9 @@ private:
return Logger::isLoggingEnabledForLevel(Logger::Level::Warning);
}
bool recordHash(StringRef hash, bool isKnown) override {
return impl.recordHash(hash, isKnown);
}
bool startDependency(StringRef name, StringRef path, bool isClangModule,
bool isSystem, StringRef hash) override {
bool startDependency(StringRef name, StringRef path, bool isClangModule, bool isSystem) override {
auto kindUID = getUIDForDependencyKind(isClangModule);
return impl.startDependency(kindUID, name, path, isSystem, hash);
return impl.startDependency(kindUID, name, path, isSystem);
}
bool finishDependency(bool isClangModule) override {
@@ -168,7 +163,6 @@ private:
static void indexModule(llvm::MemoryBuffer *Input,
StringRef ModuleName,
StringRef Hash,
IndexingConsumer &IdxConsumer,
CompilerInstance &CI,
ArrayRef<const char *> Args) {
@@ -208,7 +202,7 @@ static void indexModule(llvm::MemoryBuffer *Input,
(void)createTypeChecker(Ctx);
SKIndexDataConsumer IdxDataConsumer(IdxConsumer);
index::indexModule(Mod, Hash, IdxDataConsumer);
index::indexModule(Mod, IdxDataConsumer);
}
@@ -239,8 +233,7 @@ void trace::initTraceInfo(trace::SwiftInvocation &SwiftArgs,
void SwiftLangSupport::indexSource(StringRef InputFile,
IndexingConsumer &IdxConsumer,
ArrayRef<const char *> OrigArgs,
StringRef Hash) {
ArrayRef<const char *> OrigArgs) {
std::string Error;
auto InputBuf = ASTMgr->getMemoryBuffer(InputFile, Error);
if (!InputBuf) {
@@ -288,7 +281,7 @@ void SwiftLangSupport::indexSource(StringRef InputFile,
}
indexModule(InputBuf.get(), llvm::sys::path::stem(Filename),
Hash, IdxConsumer, CI, Args);
IdxConsumer, CI, Args);
return;
}
@@ -320,5 +313,5 @@ void SwiftLangSupport::indexSource(StringRef InputFile,
(void)createTypeChecker(CI.getASTContext());
SKIndexDataConsumer IdxDataConsumer(IdxConsumer);
index::indexSourceFile(CI.getPrimarySourceFile(), Hash, IdxDataConsumer);
index::indexSourceFile(CI.getPrimarySourceFile(), IdxDataConsumer);
}