mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SourceKit] Remove diagnostics path calculation
The diagnostic group documentation now point to the swift.org URL rather
than the toolchain path, so it no longer needs to be passed all the way
through sourcekitd.
Resolves rdar://151500502.
(cherry picked from commit 381684a389)
This commit is contained in:
@@ -564,12 +564,11 @@ struct SwiftASTManager::Implementation {
|
||||
std::shared_ptr<SwiftStatistics> Stats,
|
||||
std::shared_ptr<RequestTracker> ReqTracker,
|
||||
std::shared_ptr<PluginRegistry> Plugins, StringRef SwiftExecutablePath,
|
||||
StringRef RuntimeResourcePath, StringRef DiagnosticDocumentationPath)
|
||||
StringRef RuntimeResourcePath)
|
||||
: EditorDocs(EditorDocs), Config(Config), Stats(Stats),
|
||||
ReqTracker(ReqTracker), Plugins(Plugins),
|
||||
SwiftExecutablePath(SwiftExecutablePath),
|
||||
RuntimeResourcePath(RuntimeResourcePath),
|
||||
DiagnosticDocumentationPath(DiagnosticDocumentationPath),
|
||||
SessionTimestamp(llvm::sys::toTimeT(std::chrono::system_clock::now())) {
|
||||
}
|
||||
|
||||
@@ -582,7 +581,6 @@ struct SwiftASTManager::Implementation {
|
||||
/// Used to find clang relative to it.
|
||||
std::string SwiftExecutablePath;
|
||||
std::string RuntimeResourcePath;
|
||||
std::string DiagnosticDocumentationPath;
|
||||
SourceManager SourceMgr;
|
||||
Cache<ASTKey, ASTProducerRef> ASTCache{ "sourcekit.swift.ASTCache" };
|
||||
llvm::sys::Mutex CacheMtx;
|
||||
@@ -668,10 +666,9 @@ SwiftASTManager::SwiftASTManager(
|
||||
std::shared_ptr<SwiftStatistics> Stats,
|
||||
std::shared_ptr<RequestTracker> ReqTracker,
|
||||
std::shared_ptr<PluginRegistry> Plugins, StringRef SwiftExecutablePath,
|
||||
StringRef RuntimeResourcePath, StringRef DiagnosticDocumentationPath)
|
||||
StringRef RuntimeResourcePath)
|
||||
: Impl(*new Implementation(EditorDocs, Config, Stats, ReqTracker, Plugins,
|
||||
SwiftExecutablePath, RuntimeResourcePath,
|
||||
DiagnosticDocumentationPath)) {}
|
||||
SwiftExecutablePath, RuntimeResourcePath)) {}
|
||||
|
||||
SwiftASTManager::~SwiftASTManager() {
|
||||
delete &Impl;
|
||||
@@ -710,8 +707,8 @@ bool SwiftASTManager::initCompilerInvocation(
|
||||
std::string &Error) {
|
||||
return ide::initCompilerInvocation(
|
||||
Invocation, OrigArgs, Action, Diags, UnresolvedPrimaryFile, FileSystem,
|
||||
Impl.SwiftExecutablePath, Impl.RuntimeResourcePath,
|
||||
Impl.DiagnosticDocumentationPath, Impl.SessionTimestamp, Error);
|
||||
Impl.SwiftExecutablePath, Impl.RuntimeResourcePath, Impl.SessionTimestamp,
|
||||
Error);
|
||||
}
|
||||
|
||||
bool SwiftASTManager::initCompilerInvocation(
|
||||
|
||||
Reference in New Issue
Block a user