+add_subdirectory(support)
+
# Configure the Features.inc file.
if (NOT DEFINED CLANGD_BUILD_XPC)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
FrontendOpenMP
)
-if(CLANG_BUILT_STANDALONE)
- # needed to get HAVE_CXX_ATOMICS64_WITHOUT_LIB defined
- include(CheckAtomic)
-endif()
-
-set(CLANGD_ATOMIC_LIB "")
-if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB OR NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
- list(APPEND CLANGD_ATOMIC_LIB "atomic")
-endif()
-
add_clang_library(clangDaemon
AST.cpp
- Cancellation.cpp
ClangdLSPServer.cpp
ClangdServer.cpp
CodeComplete.cpp
CollectMacros.cpp
CompileCommands.cpp
Compiler.cpp
- Context.cpp
Diagnostics.cpp
DraftStore.cpp
ExpectedTypes.cpp
FileDistance.cpp
Format.cpp
FS.cpp
- FSProvider.cpp
FormattedString.cpp
FuzzyMatch.cpp
GlobalCompilationDatabase.cpp
Hover.cpp
IncludeFixer.cpp
JSONTransport.cpp
- Logger.cpp
PathMapping.cpp
Protocol.cpp
Quality.cpp
Selection.cpp
SemanticHighlighting.cpp
SemanticSelection.cpp
- Shutdown.cpp
SourceCode.cpp
QueryDriverDatabase.cpp
- Threading.cpp
- Trace.cpp
TUScheduler.cpp
URI.cpp
XRefs.cpp
clangToolingInclusions
clangToolingRefactoring
clangToolingSyntax
- ${LLVM_PTHREAD_LIB}
- ${CLANGD_ATOMIC_LIB}
+ clangdSupport
${ALL_CLANG_TIDY_CHECKS}
)
//===----------------------------------------------------------------------===//
#include "ClangdLSPServer.h"
-#include "Context.h"
#include "Diagnostics.h"
#include "DraftStore.h"
#include "FormattedString.h"
#include "SemanticHighlighting.h"
#include "SourceCode.h"
#include "TUScheduler.h"
-#include "Trace.h"
#include "URI.h"
#include "refactor/Tweak.h"
+#include "support/Context.h"
+#include "support/Trace.h"
#include "clang/Basic/Version.h"
#include "clang/Tooling/Core/Replacement.h"
#include "llvm/ADT/ArrayRef.h"
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDLSPSERVER_H
#include "ClangdServer.h"
-#include "Context.h"
#include "DraftStore.h"
#include "Features.inc"
#include "FindSymbols.h"
#include "GlobalCompilationDatabase.h"
-#include "Path.h"
#include "Protocol.h"
#include "Transport.h"
+#include "support/Context.h"
+#include "support/Path.h"
#include "clang/Tooling/Core/Replacement.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringSet.h"
#include "FormattedString.h"
#include "HeaderSourceSwitch.h"
#include "Headers.h"
-#include "Logger.h"
#include "ParsedAST.h"
#include "Preamble.h"
#include "Protocol.h"
#include "SemanticSelection.h"
#include "SourceCode.h"
#include "TUScheduler.h"
-#include "Trace.h"
#include "XRefs.h"
#include "index/CanonicalIncludes.h"
#include "index/FileIndex.h"
#include "index/Merge.h"
#include "refactor/Rename.h"
#include "refactor/Tweak.h"
+#include "support/Logger.h"
+#include "support/Trace.h"
#include "clang/Format/Format.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/CompilerInvocation.h"
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDSERVER_H
#include "../clang-tidy/ClangTidyOptions.h"
-#include "Cancellation.h"
#include "CodeComplete.h"
-#include "FSProvider.h"
#include "FormattedString.h"
-#include "Function.h"
#include "GlobalCompilationDatabase.h"
#include "Hover.h"
#include "Protocol.h"
#include "index/Index.h"
#include "refactor/Rename.h"
#include "refactor/Tweak.h"
+#include "support/Cancellation.h"
+#include "support/FSProvider.h"
+#include "support/Function.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "clang/Tooling/Core/Replacement.h"
#include "llvm/ADT/FunctionExtras.h"
#include "FileDistance.h"
#include "FuzzyMatch.h"
#include "Headers.h"
-#include "Logger.h"
#include "Preamble.h"
#include "Protocol.h"
#include "Quality.h"
#include "SourceCode.h"
#include "TUScheduler.h"
-#include "Threading.h"
-#include "Trace.h"
#include "URI.h"
#include "index/Index.h"
#include "index/Symbol.h"
#include "index/SymbolOrigin.h"
+#include "support/Logger.h"
+#include "support/Threading.h"
+#include "support/Trace.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/Basic/CharInfo.h"
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CODECOMPLETE_H
#include "Headers.h"
-#include "Logger.h"
-#include "Path.h"
#include "Protocol.h"
#include "Quality.h"
#include "index/Index.h"
#include "index/Symbol.h"
#include "index/SymbolOrigin.h"
+#include "support/Logger.h"
+#include "support/Path.h"
#include "clang/Sema/CodeCompleteConsumer.h"
#include "clang/Sema/CodeCompleteOptions.h"
#include "clang/Tooling/CompilationDatabase.h"
//===----------------------------------------------------------------------===//
#include "CompileCommands.h"
-#include "Logger.h"
+#include "support/Logger.h"
#include "clang/Frontend/CompilerInvocation.h"
#include "clang/Tooling/ArgumentsAdjusters.h"
#include "llvm/Support/FileSystem.h"
//===----------------------------------------------------------------------===//
#include "Compiler.h"
-#include "Logger.h"
+#include "support/Logger.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Serialization/PCHContainerOperations.h"
#include "Diagnostics.h"
#include "../clang-tidy/ClangTidyDiagnosticConsumer.h"
#include "Compiler.h"
-#include "Logger.h"
#include "Protocol.h"
#include "SourceCode.h"
+#include "support/Logger.h"
#include "clang/Basic/AllDiagnostics.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticIDs.h"
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_DIAGNOSTICS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DIAGNOSTICS_H
-#include "Path.h"
#include "Protocol.h"
+#include "support/Path.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/LangOptions.h"
#include "llvm/ADT/ArrayRef.h"
//===----------------------------------------------------------------------===//
#include "DraftStore.h"
-#include "Logger.h"
#include "SourceCode.h"
+#include "support/Logger.h"
#include "llvm/Support/Errc.h"
namespace clang {
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_DRAFTSTORE_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DRAFTSTORE_H
-#include "Path.h"
#include "Protocol.h"
+#include "support/Path.h"
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/StringMap.h"
#include <mutex>
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FS_H
-#include "Path.h"
+#include "support/Path.h"
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringMap.h"
//===-------------------------------------------------------------------------//
#include "FileDistance.h"
-#include "Logger.h"
+#include "support/Logger.h"
#include "llvm/ADT/STLExtras.h"
#include <queue>
#include "AST.h"
#include "FuzzyMatch.h"
-#include "Logger.h"
#include "ParsedAST.h"
#include "Quality.h"
#include "SourceCode.h"
#include "index/Index.h"
+#include "support/Logger.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/Index/IndexDataConsumer.h"
#include "clang/Index/IndexSymbol.h"
#include "FindTarget.h"
#include "AST.h"
-#include "Logger.h"
+#include "support/Logger.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
//
//===----------------------------------------------------------------------===//
#include "Format.h"
-#include "Logger.h"
-#include "clang/Basic/SourceManager.h"
+#include "support/Logger.h"
#include "clang/Basic/FileManager.h"
+#include "clang/Basic/SourceManager.h"
#include "clang/Format/Format.h"
#include "clang/Lex/Lexer.h"
#include "clang/Tooling/Core/Replacement.h"
#include "GlobalCompilationDatabase.h"
#include "FS.h"
-#include "Logger.h"
-#include "Path.h"
+#include "support/Logger.h"
+#include "support/Path.h"
#include "clang/Frontend/CompilerInvocation.h"
#include "clang/Tooling/ArgumentsAdjusters.h"
#include "clang/Tooling/CompilationDatabase.h"
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_GLOBALCOMPILATIONDATABASE_H
#include "CompileCommands.h"
-#include "Function.h"
-#include "Path.h"
+#include "support/Function.h"
+#include "support/Path.h"
#include "clang/Tooling/ArgumentsAdjusters.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/Optional.h"
#include "HeaderSourceSwitch.h"
#include "AST.h"
-#include "Logger.h"
#include "SourceCode.h"
#include "index/SymbolCollector.h"
+#include "support/Logger.h"
#include "clang/AST/Decl.h"
namespace clang {
#include "Headers.h"
#include "Compiler.h"
-#include "Logger.h"
#include "SourceCode.h"
+#include "support/Logger.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/CompilerInvocation.h"
#include "clang/Frontend/FrontendActions.h"
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_HEADERS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_HEADERS_H
-#include "Path.h"
#include "Protocol.h"
#include "SourceCode.h"
#include "index/Symbol.h"
+#include "support/Path.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Format/Format.h"
#include "clang/Lex/HeaderSearch.h"
#include "CodeCompletionStrings.h"
#include "FindTarget.h"
#include "FormattedString.h"
-#include "Logger.h"
#include "ParsedAST.h"
#include "Selection.h"
#include "SourceCode.h"
#include "index/SymbolCollector.h"
+#include "support/Logger.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Decl.h"
#include "IncludeFixer.h"
#include "AST.h"
#include "Diagnostics.h"
-#include "Logger.h"
#include "SourceCode.h"
-#include "Trace.h"
#include "index/Index.h"
#include "index/Symbol.h"
+#include "support/Logger.h"
+#include "support/Trace.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclarationName.h"
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-#include "Cancellation.h"
-#include "Logger.h"
#include "Protocol.h" // For LSPError
-#include "Shutdown.h"
#include "Transport.h"
+#include "support/Cancellation.h"
+#include "support/Logger.h"
+#include "support/Shutdown.h"
#include "llvm/Support/Errno.h"
#include "llvm/Support/Error.h"
#include "Diagnostics.h"
#include "Headers.h"
#include "IncludeFixer.h"
-#include "Logger.h"
#include "SourceCode.h"
-#include "Trace.h"
#include "index/CanonicalIncludes.h"
#include "index/Index.h"
+#include "support/Logger.h"
+#include "support/Trace.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/Basic/LangOptions.h"
#include "Compiler.h"
#include "Diagnostics.h"
#include "Headers.h"
-#include "Path.h"
#include "Preamble.h"
#include "index/CanonicalIncludes.h"
+#include "support/Path.h"
#include "clang/Frontend/FrontendAction.h"
#include "clang/Frontend/PrecompiledPreamble.h"
#include "clang/Lex/Preprocessor.h"
#include "Preamble.h"
#include "Compiler.h"
#include "Headers.h"
-#include "Logger.h"
-#include "Trace.h"
+#include "support/Logger.h"
+#include "support/Trace.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "Diagnostics.h"
#include "FS.h"
#include "Headers.h"
-#include "Path.h"
#include "index/CanonicalIncludes.h"
+#include "support/Path.h"
#include "clang/Frontend/CompilerInvocation.h"
#include "clang/Frontend/PrecompiledPreamble.h"
#include "clang/Tooling/CompilationDatabase.h"
//===----------------------------------------------------------------------===//
#include "Protocol.h"
-#include "Logger.h"
#include "URI.h"
+#include "support/Logger.h"
#include "clang/Basic/LLVM.h"
#include "clang/Index/IndexSymbol.h"
#include "llvm/ADT/Hashing.h"
// in the paths that are explicitly whitelisted by the user.
#include "GlobalCompilationDatabase.h"
-#include "Logger.h"
-#include "Path.h"
-#include "Trace.h"
+#include "support/Logger.h"
+#include "support/Path.h"
+#include "support/Trace.h"
#include "clang/Driver/Types.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/DenseMap.h"
//===----------------------------------------------------------------------===//
#include "Selection.h"
-#include "Logger.h"
#include "SourceCode.h"
+#include "support/Logger.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "SemanticHighlighting.h"
#include "FindTarget.h"
-#include "Logger.h"
#include "ParsedAST.h"
#include "Protocol.h"
#include "SourceCode.h"
+#include "support/Logger.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
//===----------------------------------------------------------------------===//
#include "SourceCode.h"
-#include "Context.h"
#include "FuzzyMatch.h"
-#include "Logger.h"
#include "Protocol.h"
#include "refactor/Tweak.h"
+#include "support/Context.h"
+#include "support/Logger.h"
#include "clang/AST/ASTContext.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SOURCECODE_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SOURCECODE_H
-#include "Context.h"
#include "Protocol.h"
+#include "support/Context.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
// requests will receive latest build preamble, which might possibly be stale.
#include "TUScheduler.h"
-#include "Cancellation.h"
#include "Compiler.h"
-#include "Context.h"
#include "Diagnostics.h"
#include "GlobalCompilationDatabase.h"
-#include "Logger.h"
#include "ParsedAST.h"
-#include "Path.h"
#include "Preamble.h"
-#include "Threading.h"
-#include "Trace.h"
#include "index/CanonicalIncludes.h"
+#include "support/Cancellation.h"
+#include "support/Context.h"
+#include "support/Logger.h"
+#include "support/Path.h"
+#include "support/Threading.h"
+#include "support/Trace.h"
#include "clang/Frontend/CompilerInvocation.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/FunctionExtras.h"
#include "Compiler.h"
#include "Diagnostics.h"
-#include "Function.h"
#include "GlobalCompilationDatabase.h"
-#include "Path.h"
-#include "Threading.h"
#include "index/CanonicalIncludes.h"
+#include "support/Function.h"
+#include "support/Path.h"
+#include "support/Threading.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringMap.h"
#include "CodeCompletionStrings.h"
#include "FindSymbols.h"
#include "FindTarget.h"
-#include "Logger.h"
#include "ParsedAST.h"
#include "Protocol.h"
#include "Quality.h"
#include "index/Merge.h"
#include "index/Relation.h"
#include "index/SymbolLocation.h"
+#include "support/Logger.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Attr.h"
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_XREFS_H
#include "FormattedString.h"
-#include "Path.h"
#include "Protocol.h"
#include "SourceCode.h"
#include "index/Index.h"
#include "index/SymbolLocation.h"
+#include "support/Path.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Type.h"
#include "clang/Format/Format.h"
#include "ClangdLSPServer.h"
#include "ClangdServer.h"
#include "CodeComplete.h"
-#include "FSProvider.h"
#include "refactor/Rename.h"
+#include "support/FSProvider.h"
#include <cstdio>
#include <sstream>
#include "index/Background.h"
#include "Compiler.h"
-#include "Context.h"
-#include "FSProvider.h"
#include "Headers.h"
-#include "Logger.h"
#include "ParsedAST.h"
-#include "Path.h"
#include "SourceCode.h"
#include "Symbol.h"
-#include "Threading.h"
-#include "Trace.h"
#include "URI.h"
#include "index/BackgroundIndexLoader.h"
#include "index/FileIndex.h"
#include "index/Relation.h"
#include "index/Serialization.h"
#include "index/SymbolCollector.h"
+#include "support/Context.h"
+#include "support/FSProvider.h"
+#include "support/Logger.h"
+#include "support/Path.h"
+#include "support/Threading.h"
+#include "support/Trace.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Driver/Types.h"
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_BACKGROUND_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_BACKGROUND_H
-#include "Context.h"
-#include "FSProvider.h"
#include "GlobalCompilationDatabase.h"
-#include "Path.h"
#include "SourceCode.h"
-#include "Threading.h"
#include "index/BackgroundRebuild.h"
#include "index/FileIndex.h"
#include "index/Index.h"
#include "index/Serialization.h"
+#include "support/Context.h"
+#include "support/FSProvider.h"
+#include "support/Path.h"
+#include "support/Threading.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/Threading.h"
#include "index/BackgroundIndexLoader.h"
#include "GlobalCompilationDatabase.h"
-#include "Logger.h"
-#include "Path.h"
#include "index/Background.h"
+#include "support/Logger.h"
+#include "support/Path.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallString.h"
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_BACKGROUND_INDEX_LOADER_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_BACKGROUND_INDEX_LOADER_H
-#include "Path.h"
#include "index/Background.h"
+#include "support/Path.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
//===----------------------------------------------------------------------===//
#include "GlobalCompilationDatabase.h"
-#include "Logger.h"
-#include "Path.h"
#include "index/Background.h"
+#include "support/Logger.h"
+#include "support/Path.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
//
//===----------------------------------------------------------------------===//
-#include "Logger.h"
#include "index/Background.h"
+#include "support/Logger.h"
namespace clang {
namespace clangd {
#include "index/BackgroundRebuild.h"
#include "Compiler.h"
#include "Headers.h"
-#include "Logger.h"
#include "ParsedAST.h"
-#include "Path.h"
#include "SourceCode.h"
#include "Symbol.h"
-#include "Threading.h"
-#include "Trace.h"
#include "URI.h"
#include "index/FileIndex.h"
#include "index/IndexAction.h"
#include "index/Relation.h"
#include "index/Serialization.h"
#include "index/SymbolCollector.h"
+#include "support/Logger.h"
+#include "support/Path.h"
+#include "support/Threading.h"
+#include "support/Trace.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/Hashing.h"
#include "FileIndex.h"
#include "CollectMacros.h"
-#include "Logger.h"
#include "ParsedAST.h"
-#include "Path.h"
#include "SymbolCollector.h"
#include "index/CanonicalIncludes.h"
#include "index/Index.h"
#include "index/SymbolID.h"
#include "index/SymbolOrigin.h"
#include "index/dex/Dex.h"
+#include "support/Logger.h"
+#include "support/Path.h"
#include "clang/AST/ASTContext.h"
#include "clang/Index/IndexingAction.h"
#include "clang/Index/IndexingOptions.h"
#include "Index.h"
#include "MemIndex.h"
#include "Merge.h"
-#include "Path.h"
#include "index/CanonicalIncludes.h"
#include "index/Ref.h"
#include "index/Relation.h"
#include "index/Serialization.h"
#include "index/Symbol.h"
+#include "support/Path.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/DenseSet.h"
//===----------------------------------------------------------------------===//
#include "Index.h"
-#include "Logger.h"
+#include "support/Logger.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
#include "IndexAction.h"
#include "Headers.h"
-#include "Logger.h"
#include "index/Relation.h"
#include "index/SymbolOrigin.h"
+#include "support/Logger.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/Basic/SourceLocation.h"
#include "MemIndex.h"
#include "FuzzyMatch.h"
-#include "Logger.h"
#include "Quality.h"
-#include "Trace.h"
+#include "support/Logger.h"
+#include "support/Trace.h"
#include "clang/Index/IndexSymbol.h"
namespace clang {
//===----------------------------------------------------------------------===//
#include "Merge.h"
-#include "Logger.h"
-#include "Trace.h"
#include "index/Symbol.h"
#include "index/SymbolLocation.h"
#include "index/SymbolOrigin.h"
+#include "support/Logger.h"
+#include "support/Trace.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "Serialization.h"
#include "Headers.h"
-#include "Logger.h"
#include "RIFF.h"
#include "SymbolLocation.h"
#include "SymbolOrigin.h"
-#include "Trace.h"
#include "dex/Dex.h"
+#include "support/Logger.h"
+#include "support/Trace.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Compression.h"
#include "CodeComplete.h"
#include "CodeCompletionStrings.h"
#include "ExpectedTypes.h"
-#include "Logger.h"
#include "SourceCode.h"
#include "SymbolLocation.h"
#include "URI.h"
#include "index/SymbolID.h"
+#include "support/Logger.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "Serialization.h"
#include "SymbolLocation.h"
#include "SymbolOrigin.h"
-#include "Trace.h"
#include "dex/Dex.h"
+#include "support/Trace.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "Dex.h"
#include "FileDistance.h"
#include "FuzzyMatch.h"
-#include "Logger.h"
#include "Quality.h"
-#include "Trace.h"
#include "index/Index.h"
#include "index/dex/Iterator.h"
+#include "support/Logger.h"
+#include "support/Trace.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/ScopedPrinter.h"
#include <algorithm>
protobuf
grpc++
clangDaemon
+ clangdSupport
)
add_subdirectory(marshalling)
#include "Client.h"
#include "Index.grpc.pb.h"
-#include "Logger.h"
-#include "Trace.h"
#include "index/Serialization.h"
#include "marshalling/Marshalling.h"
+#include "support/Logger.h"
+#include "support/Trace.h"
#include "llvm/Support/YAMLTraits.h"
namespace clang {
protobuf
clangDaemon
+ clangdSupport
)
//===----------------------------------------------------------------------===//
#include "Marshalling.h"
-#include "Logger.h"
#include "index/Serialization.h"
+#include "support/Logger.h"
namespace clang {
namespace clangd {
LINK_LIBS
clangDaemon
+ clangdSupport
)
//
//===----------------------------------------------------------------------===//
-#include "Logger.h"
#include "index/remote/Client.h"
+#include "support/Logger.h"
namespace clang {
namespace clangd {
#include "refactor/Rename.h"
#include "AST.h"
#include "FindTarget.h"
-#include "Logger.h"
#include "ParsedAST.h"
#include "Selection.h"
#include "SourceCode.h"
-#include "Trace.h"
#include "index/SymbolCollector.h"
+#include "support/Logger.h"
+#include "support/Trace.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/Basic/SourceLocation.h"
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_REFACTOR_RENAME_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_REFACTOR_RENAME_H
-#include "Path.h"
#include "Protocol.h"
#include "SourceCode.h"
+#include "support/Path.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Tooling/Core/Replacement.h"
#include "llvm/Support/Error.h"
//
//===----------------------------------------------------------------------===//
#include "Tweak.h"
-#include "Logger.h"
-#include "Path.h"
#include "SourceCode.h"
#include "index/Index.h"
+#include "support/Logger.h"
+#include "support/Path.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_REFACTOR_ACTIONS_TWEAK_H
#include "ParsedAST.h"
-#include "Path.h"
#include "Protocol.h"
#include "Selection.h"
#include "SourceCode.h"
#include "index/Index.h"
+#include "support/Path.h"
#include "clang/Tooling/Core/Replacement.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringMap.h"
#include "AST.h"
#include "FindTarget.h"
-#include "Logger.h"
#include "refactor/Tweak.h"
+#include "support/Logger.h"
#include "clang/AST/Decl.h"
#include "clang/AST/RecursiveASTVisitor.h"
clangAST
clangBasic
clangDaemon
+ clangdSupport
clangFormat
clangLex
clangToolingCore
#include "AST.h"
#include "FindTarget.h"
-#include "Logger.h"
#include "Selection.h"
#include "SourceCode.h"
#include "XRefs.h"
#include "refactor/Tweak.h"
+#include "support/Logger.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Decl.h"
#include "AST.h"
#include "FindTarget.h"
#include "HeaderSourceSwitch.h"
-#include "Logger.h"
#include "ParsedAST.h"
-#include "Path.h"
#include "Selection.h"
#include "SourceCode.h"
#include "refactor/Tweak.h"
+#include "support/Logger.h"
+#include "support/Path.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
//===----------------------------------------------------------------------===//
#include "refactor/Tweak.h"
-#include "Logger.h"
+#include "XRefs.h"
+#include "support/Logger.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
+#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Error.h"
+#include <AST.h>
#include <climits>
#include <memory>
#include <string>
-#include <AST.h>
-#include "XRefs.h"
-#include "llvm/ADT/StringExtras.h"
namespace clang {
namespace clangd {
//===----------------------------------------------------------------------===//
#include "AST.h"
-#include "Logger.h"
#include "ParsedAST.h"
#include "Selection.h"
#include "SourceCode.h"
#include "refactor/Tweak.h"
+#include "support/Logger.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclTemplate.h"
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-#include "Logger.h"
#include "ParsedAST.h"
#include "Protocol.h"
#include "Selection.h"
#include "SourceCode.h"
#include "refactor/Tweak.h"
+#include "support/Logger.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
//
//===----------------------------------------------------------------------===//
-#include "Logger.h"
#include "ParsedAST.h"
#include "SourceCode.h"
#include "refactor/Tweak.h"
+#include "support/Logger.h"
#include "clang/AST/ExprObjC.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-#include "Logger.h"
#include "ParsedAST.h"
#include "SourceCode.h"
#include "refactor/Tweak.h"
+#include "support/Logger.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/Stmt.h"
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-#include "Logger.h"
#include "ParsedAST.h"
#include "SourceCode.h"
#include "refactor/Tweak.h"
+#include "support/Logger.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/Stmt.h"
--- /dev/null
+# clangd/support contains low-level support libraries that do not depend
+# on clang either programmatically or conceptually.
+
+set(LLVM_LINK_COMPONENTS
+ Support
+ )
+
+if(CLANG_BUILT_STANDALONE)
+ # needed to get HAVE_CXX_ATOMICS64_WITHOUT_LIB defined
+ include(CheckAtomic)
+endif()
+
+set(CLANGD_ATOMIC_LIB "")
+if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB OR NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
+ list(APPEND CLANGD_ATOMIC_LIB "atomic")
+endif()
+
+include_directories(..)
+add_clang_library(clangdSupport
+ Cancellation.cpp
+ Context.cpp
+ FSProvider.cpp
+ Logger.cpp
+ Shutdown.cpp
+ Threading.cpp
+ Trace.cpp
+
+ LINK_LIBS
+ ${LLVM_PTHREAD_LIB}
+ ${CLANGD_ATOMIC_LIB}
+ )
//
//===----------------------------------------------------------------------===//
-#include "Cancellation.h"
+#include "support/Cancellation.h"
#include <atomic>
namespace clang {
// Measuring the start -> cancel -> acknowledge -> finish timeline would
// help find where libraries' cancellation should be improved.
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CANCELLATION_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CANCELLATION_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_CANCELLATION_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_CANCELLATION_H
-#include "Context.h"
+#include "support/Context.h"
#include "llvm/Support/Error.h"
#include <functional>
#include <system_error>
//
//===----------------------------------------------------------------------===//
-#include "Context.h"
+#include "support/Context.h"
#include <cassert>
namespace clang {
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CONTEXT_H_
-#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CONTEXT_H_
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_CONTEXT_H_
+#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_CONTEXT_H_
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Compiler.h"
template <class Type>
Context derive(const Key<Type> &Key,
typename std::decay<Type>::type Value) const & {
- return Context(std::make_shared<Data>(Data{
- /*Parent=*/DataPtr, &Key,
- std::make_unique<TypedAnyStorage<typename std::decay<Type>::type>>(
- std::move(Value))}));
+ return Context(std::make_shared<Data>(
+ Data{/*Parent=*/DataPtr, &Key,
+ std::make_unique<TypedAnyStorage<typename std::decay<Type>::type>>(
+ std::move(Value))}));
}
template <class Type>
Context
derive(const Key<Type> &Key,
typename std::decay<Type>::type Value) && /* takes ownership */ {
- return Context(std::make_shared<Data>(Data{
- /*Parent=*/std::move(DataPtr), &Key,
- std::make_unique<TypedAnyStorage<typename std::decay<Type>::type>>(
- std::move(Value))}));
+ return Context(std::make_shared<Data>(
+ Data{/*Parent=*/std::move(DataPtr), &Key,
+ std::make_unique<TypedAnyStorage<typename std::decay<Type>::type>>(
+ std::move(Value))}));
}
/// Derives a child context, using an anonymous key.
} // namespace clangd
} // namespace clang
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_CONTEXT_H_
+#endif
//
//===----------------------------------------------------------------------===//
-#include "FSProvider.h"
+#include "support/FSProvider.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FSPROVIDER_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FSPROVIDER_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_FSPROVIDER_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_FSPROVIDER_H
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/Support/VirtualFileSystem.h"
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FUNCTION_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FUNCTION_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_FUNCTION_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_FUNCTION_H
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/Support/Error.h"
//
//===----------------------------------------------------------------------===//
-#include "Logger.h"
-#include "Trace.h"
+#include "support/Logger.h"
+#include "support/Trace.h"
#include "llvm/Support/Chrono.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.h"
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_LOGGER_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_LOGGER_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_LOGGER_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_LOGGER_H
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Debug.h"
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_PATH_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_PATH_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_PATH_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_PATH_H
#include "llvm/ADT/StringRef.h"
#include <string>
//
//===----------------------------------------------------------------------===//
-#include "Shutdown.h"
+#include "support/Shutdown.h"
#include <atomic>
#include <cstdlib>
std::abort();
}
-bool shutdownRequested() {
- return ShutdownRequested;
-}
+bool shutdownRequested() { return ShutdownRequested; }
} // namespace clangd
} // namespace clang
-
// returns an error, etc.
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SHUTDOWN_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SHUTDOWN_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_SHUTDOWN_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_SHUTDOWN_H
#include <cerrno>
#include <chrono>
-#include "Threading.h"
-#include "Trace.h"
-#include "clang/Basic/Stack.h"
+#include "support/Threading.h"
+#include "support/Trace.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Threading.h"
#include <pthread.h>
#elif defined(__APPLE__)
#include <sys/resource.h>
-#elif defined (_WIN32)
+#elif defined(_WIN32)
#include <windows.h>
#endif
};
// Ensure our worker threads have big enough stacks to run clang.
- llvm::llvm_execute_on_thread_async(std::move(Task), clang::DesiredStackSize);
+ llvm::llvm_execute_on_thread_async(std::move(Task),
+ /*clang::DesiredStackSize*/ 8 << 20);
}
Deadline timeoutSeconds(llvm::Optional<double> Seconds) {
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_THREADING_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_THREADING_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_THREADING_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_THREADING_H
-#include "Context.h"
+#include "support/Context.h"
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/ADT/Twine.h"
#include <cassert>
//
//===----------------------------------------------------------------------===//
-#include "Trace.h"
-#include "Context.h"
+#include "support/Trace.h"
+#include "support/Context.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Support/Chrono.h"
void rawEvent(llvm::StringRef Phase,
const llvm::json::Object &Event) /*REQUIRES(Mu)*/ {
// PID 0 represents the clangd process.
- Out.object([&]{
+ Out.object([&] {
Out.attribute("pid", 0);
Out.attribute("ph", Phase);
- for (const auto& KV : Event)
+ for (const auto &KV : Event)
Out.attribute(KV.first, KV.second);
});
}
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRACE_H_
-#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRACE_H_
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_TRACE_H_
+#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_TRACE_H_
-#include "Context.h"
+#include "support/Context.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/raw_ostream.h"
} // namespace clangd
} // namespace clang
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRACE_H_
+#endif
#include "ClangdLSPServer.h"
#include "CodeComplete.h"
#include "Features.inc"
-#include "Path.h"
#include "PathMapping.h"
#include "Protocol.h"
-#include "Shutdown.h"
-#include "Trace.h"
#include "Transport.h"
#include "index/Background.h"
#include "index/Serialization.h"
#include "refactor/Rename.h"
+#include "support/Path.h"
+#include "support/Shutdown.h"
+#include "support/Trace.h"
#include "clang/Basic/Version.h"
#include "clang/Format/Format.h"
#include "llvm/ADT/Optional.h"
Annotations.cpp
ASTTests.cpp
BackgroundIndexTests.cpp
- CancellationTests.cpp
CanonicalIncludesTests.cpp
ClangdTests.cpp
ClangdLSPServerTests.cpp
CodeCompletionStringsTests.cpp
CollectMacrosTests.cpp
CompileCommandsTests.cpp
- ContextTests.cpp
DexTests.cpp
DiagnosticsTests.cpp
DraftStoreTests.cpp
FormattedStringTests.cpp
FormatTests.cpp
FSTests.cpp
- FunctionTests.cpp
FuzzyMatchTests.cpp
GlobalCompilationDatabaseTests.cpp
HeadersTests.cpp
TestFS.cpp
TestIndex.cpp
TestTU.cpp
- ThreadingTests.cpp
- TraceTests.cpp
TypeHierarchyTests.cpp
TweakTests.cpp
TweakTesting.cpp
URITests.cpp
XRefsTests.cpp
+ support/CancellationTests.cpp
+ support/ContextTests.cpp
+ support/FunctionTests.cpp
+ support/ThreadingTests.cpp
+ support/TraceTests.cpp
+
$<TARGET_OBJECTS:obj.clangDaemonTweaks>
)
target_link_libraries(ClangdTests
PRIVATE
clangDaemon
+ clangdSupport
clangTidy
LLVMSupport
LLVMTestingSupport
#include "ClangdLSPServer.h"
#include "CodeComplete.h"
#include "LSPClient.h"
-#include "Logger.h"
#include "Protocol.h"
#include "TestFS.h"
#include "refactor/Rename.h"
+#include "support/Logger.h"
#include "llvm/Support/JSON.h"
#include "llvm/Testing/Support/SupportHelpers.h"
#include "gmock/gmock.h"
#include "Matchers.h"
#include "SyncAPI.h"
#include "TestFS.h"
-#include "Threading.h"
#include "URI.h"
+#include "support/Threading.h"
#include "clang/Config/config.h"
#include "clang/Sema/CodeCompleteConsumer.h"
#include "llvm/ADT/SmallVector.h"
#include "TestFS.h"
#include "TestIndex.h"
#include "TestTU.h"
-#include "Threading.h"
#include "index/Index.h"
#include "index/MemIndex.h"
+#include "support/Threading.h"
#include "clang/Sema/CodeCompleteConsumer.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/Support/Error.h"
#include "Annotations.h"
#include "Diagnostics.h"
#include "ParsedAST.h"
-#include "Path.h"
#include "Protocol.h"
#include "SourceCode.h"
#include "TestFS.h"
#include "TestIndex.h"
#include "TestTU.h"
#include "index/MemIndex.h"
+#include "support/Path.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticSema.h"
#include "llvm/Support/ScopedPrinter.h"
#include "GlobalCompilationDatabase.h"
#include "Matchers.h"
-#include "Path.h"
#include "TestFS.h"
+#include "support/Path.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallString.h"
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-#include "Cancellation.h"
#include "Protocol.h"
#include "Transport.h"
+#include "support/Cancellation.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <cstdio>
#include "Protocol.h"
#include "TestFS.h"
-#include "Threading.h"
#include "Transport.h"
+#include "support/Threading.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include <queue>
//
//===----------------------------------------------------------------------===//
#include "Annotations.h"
-#include "Context.h"
#include "Protocol.h"
#include "SourceCode.h"
#include "TestTU.h"
+#include "support/Context.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/TokenKinds.h"
//===----------------------------------------------------------------------===//
#include "Annotations.h"
-#include "Cancellation.h"
#include "ClangdServer.h"
-#include "Context.h"
#include "Diagnostics.h"
#include "Matchers.h"
#include "ParsedAST.h"
-#include "Path.h"
#include "Preamble.h"
#include "TUScheduler.h"
#include "TestFS.h"
-#include "Threading.h"
+#include "support/Cancellation.h"
+#include "support/Context.h"
+#include "support/Path.h"
+#include "support/Threading.h"
#include "clang/Basic/DiagnosticDriver.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
//===----------------------------------------------------------------------===//
#include "TestFS.h"
#include "GlobalCompilationDatabase.h"
-#include "Path.h"
#include "URI.h"
+#include "support/Path.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#define LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_TESTFS_H
#include "ClangdServer.h"
#include "GlobalCompilationDatabase.h"
-#include "Path.h"
+#include "support/Path.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "Compiler.h"
#include "ParsedAST.h"
-#include "Path.h"
#include "index/Index.h"
+#include "support/Path.h"
#include "llvm/ADT/StringMap.h"
#include "gtest/gtest.h"
#include <string>
-#include "Cancellation.h"
-#include "Context.h"
-#include "Threading.h"
+#include "support/Cancellation.h"
+#include "support/Context.h"
+#include "support/Threading.h"
#include "llvm/Support/Error.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
//
//===----------------------------------------------------------------------===//
-#include "Context.h"
+#include "support/Context.h"
#include "gtest/gtest.h"
//
//===----------------------------------------------------------------------===//
-#include "Function.h"
+#include "support/Function.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
//
//===----------------------------------------------------------------------===//
-#include "Threading.h"
+#include "support/Threading.h"
#include "gtest/gtest.h"
#include <mutex>
//
//===----------------------------------------------------------------------===//
-#include "Trace.h"
+#include "support/Trace.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallString.h"
add_clang_library(clangdXpcJsonConversions
Conversion.cpp
- LINK_LIBS clangDaemon
+ LINK_LIBS clangDaemon clangdSupport
)
add_clang_library(clangdXpcTransport
XPCTransport.cpp
- LINK_LIBS clangDaemon clangdXpcJsonConversions
+ LINK_LIBS clangDaemon clangdSupport clangdXpcJsonConversions
)
//===----------------------------------------------------------------------===//
#include "xpc/Conversion.h"
-#include "Logger.h"
+#include "support/Logger.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ScopedPrinter.h"
#include <string>
//
//===----------------------------------------------------------------------===//
#include "Conversion.h"
-#include "Logger.h"
#include "Protocol.h" // For LSPError
#include "Transport.h"
+#include "support/Logger.h"
#include "llvm/Support/Errno.h"
#include <xpc/xpc.h>