Skip to content

Commit bfc3212

Browse files
Merge pull request #611 from correctcomputation/merge-from-microsoft-20210615
Merge from Microsoft 2021-06-15
2 parents 76b6266 + 222cf9a commit bfc3212

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2774
-1740
lines changed

clang-tools-extra/clangd/3CCommands.cpp

Lines changed: 0 additions & 75 deletions
This file was deleted.

clang-tools-extra/clangd/3CCommands.h

Lines changed: 0 additions & 32 deletions
This file was deleted.

clang-tools-extra/clangd/3CDiagnostics.cpp

Lines changed: 0 additions & 140 deletions
This file was deleted.

clang-tools-extra/clangd/3CDiagnostics.h

Lines changed: 0 additions & 47 deletions
This file was deleted.

clang-tools-extra/clangd/CMakeLists.txt

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,7 @@ set(LLVM_LINK_COMPONENTS
2828
Option
2929
)
3030

31-
# CMake function to generate clangDaemon and 3cClangDaemon targets, minimizing
32-
# the diff in this file from upstream Clang to ease future merging.
33-
function(add_clangDaemon_target target_name)
34-
cmake_parse_arguments(ARG "" "" "EXTRA_LIBS" ${ARGN})
35-
36-
add_clang_library(${target_name}
37-
# If we omitted these from the clangDaemon target, llvm_check_source_file_list
38-
# would raise an error. We could use LLVM_OPTIONAL_SOURCES, but it doesn't
39-
# seem worth it.
40-
3CCommands.cpp
41-
3CDiagnostics.cpp
42-
31+
add_clang_library(clangDaemon
4332
AST.cpp
4433
ClangdLSPServer.cpp
4534
ClangdServer.cpp
@@ -121,7 +110,7 @@ add_clang_library(${target_name}
121110
omp_gen
122111
)
123112

124-
clang_target_link_libraries(${target_name}
113+
clang_target_link_libraries(clangDaemon
125114
PRIVATE
126115
clangAST
127116
clangASTMatchers
@@ -138,42 +127,8 @@ clang_target_link_libraries(${target_name}
138127
clangToolingInclusions
139128
clangToolingRefactoring
140129
clangToolingSyntax
141-
${ARG_EXTRA_LIBS}
142130
)
143131

144-
endfunction()
145-
146-
# Some whole-program analysis tools (including IDEs) do not cope well with the
147-
# clangd source files being included in the compilation database twice with
148-
# different preprocessor flags that lead to significantly different portions of
149-
# each file being included in the compilation. To avoid this problem,
150-
# CLANGD_EXCLUSIVE_VARIANT can be set to include only one variant of clangd in
151-
# the configuration. This can be used, for example, to rename a program element
152-
# that is part of 3C and update references to it in clangd3c. If you want to
153-
# rename an upstream Clang program element that is referenced in both
154-
# INTERACTIVE3C and !INTERACTIVE3C blocks, this won't help; fortunately, we have
155-
# never needed to do that so far.
156-
set(CLANGD_KNOWN_VARIANTS "clangd;clangd3c")
157-
set(CLANGD_EXCLUSIVE_VARIANT "" CACHE STRING
158-
"Variant of clangd to include in the configuration. If empty, include all variants.")
159-
set_property(CACHE CLANGD_EXCLUSIVE_VARIANT
160-
PROPERTY STRINGS ";${CLANGD_KNOWN_VARIANTS}")
161-
foreach(variant ${CLANGD_KNOWN_VARIANTS})
162-
if(CLANGD_EXCLUSIVE_VARIANT STREQUAL "" OR
163-
CLANGD_EXCLUSIVE_VARIANT STREQUAL variant)
164-
set(CLANGD_INCLUDE_VARIANT_${variant} ON)
165-
endif()
166-
endforeach()
167-
168-
if(CLANGD_INCLUDE_VARIANT_clangd)
169-
add_clangDaemon_target(clangDaemon)
170-
endif()
171-
172-
if(CLANGD_INCLUDE_VARIANT_clangd3c)
173-
add_clangDaemon_target(3cClangDaemon EXTRA_LIBS clang3C)
174-
target_compile_definitions(obj.3cClangDaemon PRIVATE INTERACTIVE3C=1)
175-
endif()
176-
177132
add_subdirectory(refactor/tweaks)
178133
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
179134
# FIXME: Make fuzzer not use linux-specific APIs, build it everywhere.
@@ -189,7 +144,7 @@ if ( CLANGD_BUILD_XPC )
189144
add_subdirectory(xpc)
190145
endif ()
191146

192-
if(CLANG_INCLUDE_TESTS AND CLANGD_INCLUDE_VARIANT_clangd)
147+
if(CLANG_INCLUDE_TESTS)
193148
add_subdirectory(test)
194149
add_subdirectory(unittests)
195150
endif()

0 commit comments

Comments
 (0)