Skip to content

[rebranch] remove unneeded SingleCommandCompilationDatabase #38961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions lib/ClangImporter/ClangModuleDependencyScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,6 @@ llvm::ErrorOr<StringRef> ClangModuleDependenciesCacheImpl::getImportHackFile(Str
return importHackFileCache[moduleName];
}

namespace {
class SingleCommandCompilationDatabase : public CompilationDatabase {
public:
SingleCommandCompilationDatabase(CompileCommand Cmd)
: Command(std::move(Cmd)) {}

virtual std::vector<CompileCommand>
getCompileCommands(StringRef FilePath) const override {
return {Command};
}

virtual std::vector<CompileCommand> getAllCompileCommands() const override {
return {Command};
}

private:
CompileCommand Command;
};
}

// Add search paths.
// Note: This is handled differently for the Clang importer itself, which
// adds search paths to Clang's data structures rather than to its
Expand Down