[all-commits] [llvm/llvm-project] a3a259: [LLVM][MLIR] Move LSP server support library from ...
Steven Wu via All-commits
all-commits at lists.llvm.org
Thu Sep 11 13:58:39 PDT 2025
Branch: refs/heads/users/cachemeifyoucan/spr/cas-add-mappedfileregionbumpptr
Home: https://github.com/llvm/llvm-project
Commit: a3a25996b11401f7589d1429225dc048d8720da9
https://github.com/llvm/llvm-project/commit/a3a25996b11401f7589d1429225dc048d8720da9
Author: Bertik23 <39457484+Bertik23 at users.noreply.github.com>
Date: 2025-09-11 (Thu, 11 Sep 2025)
Changed paths:
A llvm/include/llvm/Support/LSP/Logging.h
A llvm/include/llvm/Support/LSP/Protocol.h
A llvm/include/llvm/Support/LSP/Transport.h
M llvm/lib/Support/CMakeLists.txt
A llvm/lib/Support/LSP/CMakeLists.txt
A llvm/lib/Support/LSP/Logging.cpp
A llvm/lib/Support/LSP/Protocol.cpp
A llvm/lib/Support/LSP/Transport.cpp
M llvm/unittests/Support/CMakeLists.txt
A llvm/unittests/Support/LSP/CMakeLists.txt
A llvm/unittests/Support/LSP/Protocol.cpp
A llvm/unittests/Support/LSP/Transport.cpp
R mlir/include/mlir/Tools/lsp-server-support/Logging.h
R mlir/include/mlir/Tools/lsp-server-support/Protocol.h
M mlir/include/mlir/Tools/lsp-server-support/SourceMgrUtils.h
R mlir/include/mlir/Tools/lsp-server-support/Transport.h
M mlir/include/mlir/Tools/mlir-lsp-server/MlirLspRegistryFunction.h
M mlir/lib/Tools/lsp-server-support/CMakeLists.txt
M mlir/lib/Tools/lsp-server-support/CompilationDatabase.cpp
R mlir/lib/Tools/lsp-server-support/Logging.cpp
R mlir/lib/Tools/lsp-server-support/Protocol.cpp
M mlir/lib/Tools/lsp-server-support/SourceMgrUtils.cpp
R mlir/lib/Tools/lsp-server-support/Transport.cpp
M mlir/lib/Tools/mlir-lsp-server/CMakeLists.txt
M mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp
M mlir/lib/Tools/mlir-lsp-server/LSPServer.h
M mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
M mlir/lib/Tools/mlir-lsp-server/MLIRServer.h
M mlir/lib/Tools/mlir-lsp-server/MlirLspServerMain.cpp
M mlir/lib/Tools/mlir-lsp-server/Protocol.cpp
M mlir/lib/Tools/mlir-lsp-server/Protocol.h
M mlir/lib/Tools/mlir-pdll-lsp-server/CMakeLists.txt
M mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp
M mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.h
M mlir/lib/Tools/mlir-pdll-lsp-server/MlirPdllLspServerMain.cpp
M mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
M mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.h
M mlir/lib/Tools/mlir-pdll-lsp-server/Protocol.cpp
M mlir/lib/Tools/mlir-pdll-lsp-server/Protocol.h
M mlir/lib/Tools/tblgen-lsp-server/CMakeLists.txt
M mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp
M mlir/lib/Tools/tblgen-lsp-server/LSPServer.h
M mlir/lib/Tools/tblgen-lsp-server/TableGenLspServerMain.cpp
M mlir/lib/Tools/tblgen-lsp-server/TableGenServer.cpp
M mlir/lib/Tools/tblgen-lsp-server/TableGenServer.h
M mlir/tools/mlir-lsp-server/mlir-lsp-server.cpp
M mlir/unittests/CMakeLists.txt
R mlir/unittests/Tools/CMakeLists.txt
R mlir/unittests/Tools/lsp-server-support/CMakeLists.txt
R mlir/unittests/Tools/lsp-server-support/Protocol.cpp
R mlir/unittests/Tools/lsp-server-support/Transport.cpp
Log Message:
-----------
[LLVM][MLIR] Move LSP server support library from MLIR into LLVM (#157885)
This is a second PR on this patch (first #155572), that fixes the
linking problem for `flang-aarch64-dylib` test.
The SupportLSP library was made a component library.
---
This PR moves the generic Language Server Protocol (LSP) server support
code that was copied from clangd into MLIR, into the LLVM tree so it can
be reused by multiple subprojects.
Centralizing the generic LSP support in LLVM lowers the barrier to
building new LSP servers across the LLVM ecosystem and avoids each
subproject maintaining its own copy.
The code originated in clangd and was copied into MLIR for its LSP
server. MLIR had this code seperate to be reused by all of their LSP
server. This PR relocates the MLIR copy into LLVM as a shared component
into LLVM/Support. If this is not a suitable place, please suggest a
better one.
A follow up to this move could be deduplication with the original clangd
implementation and converge on a single shared LSP support library used
by clangd, MLIR, and future servers.
What changes
mlir/include/mlir/Tools/lsp-server-support/{Logging, Protocol,
Transport}.h moved to llvm/include/llvm/Support/LSP
mlir/lib/Tools/lsp-server-support/{Logging, Protocol, Transport}.cpp
moved to llvm/lib/Support/LSP
and their namespace was changed from mlir to llvm
I ran clang-tidy --fix and clang-format on the whole moved files (last
two commits), as they are basically new files and should hold up to the
code style used by LLVM.
MLIR LSP servers where updated to include these files from their new
location and account for the namespace change.
This PR is made as part of the LLVM IR LSP project
([RFC](https://discourse.llvm.org/t/rfc-ir-visualization-with-vs-code-extension-using-an-lsp-server/87773))
Commit: c82b3063b89fbeac1daf37a8fcc359bdba6f9be9
https://github.com/llvm/llvm-project/commit/c82b3063b89fbeac1daf37a8fcc359bdba6f9be9
Author: Steven Wu <stevenwu at apple.com>
Date: 2025-09-11 (Thu, 11 Sep 2025)
Changed paths:
M llvm/include/llvm/CAS/MappedFileRegionArena.h
A llvm/include/llvm/Support/LSP/Logging.h
A llvm/include/llvm/Support/LSP/Protocol.h
A llvm/include/llvm/Support/LSP/Transport.h
M llvm/lib/CAS/MappedFileRegionArena.cpp
M llvm/lib/Support/CMakeLists.txt
A llvm/lib/Support/LSP/CMakeLists.txt
A llvm/lib/Support/LSP/Logging.cpp
A llvm/lib/Support/LSP/Protocol.cpp
A llvm/lib/Support/LSP/Transport.cpp
M llvm/unittests/CAS/ProgramTest.cpp
M llvm/unittests/Support/CMakeLists.txt
A llvm/unittests/Support/LSP/CMakeLists.txt
A llvm/unittests/Support/LSP/Protocol.cpp
A llvm/unittests/Support/LSP/Transport.cpp
R mlir/include/mlir/Tools/lsp-server-support/Logging.h
R mlir/include/mlir/Tools/lsp-server-support/Protocol.h
M mlir/include/mlir/Tools/lsp-server-support/SourceMgrUtils.h
R mlir/include/mlir/Tools/lsp-server-support/Transport.h
M mlir/include/mlir/Tools/mlir-lsp-server/MlirLspRegistryFunction.h
M mlir/lib/Tools/lsp-server-support/CMakeLists.txt
M mlir/lib/Tools/lsp-server-support/CompilationDatabase.cpp
R mlir/lib/Tools/lsp-server-support/Logging.cpp
R mlir/lib/Tools/lsp-server-support/Protocol.cpp
M mlir/lib/Tools/lsp-server-support/SourceMgrUtils.cpp
R mlir/lib/Tools/lsp-server-support/Transport.cpp
M mlir/lib/Tools/mlir-lsp-server/CMakeLists.txt
M mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp
M mlir/lib/Tools/mlir-lsp-server/LSPServer.h
M mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
M mlir/lib/Tools/mlir-lsp-server/MLIRServer.h
M mlir/lib/Tools/mlir-lsp-server/MlirLspServerMain.cpp
M mlir/lib/Tools/mlir-lsp-server/Protocol.cpp
M mlir/lib/Tools/mlir-lsp-server/Protocol.h
M mlir/lib/Tools/mlir-pdll-lsp-server/CMakeLists.txt
M mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp
M mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.h
M mlir/lib/Tools/mlir-pdll-lsp-server/MlirPdllLspServerMain.cpp
M mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
M mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.h
M mlir/lib/Tools/mlir-pdll-lsp-server/Protocol.cpp
M mlir/lib/Tools/mlir-pdll-lsp-server/Protocol.h
M mlir/lib/Tools/tblgen-lsp-server/CMakeLists.txt
M mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp
M mlir/lib/Tools/tblgen-lsp-server/LSPServer.h
M mlir/lib/Tools/tblgen-lsp-server/TableGenLspServerMain.cpp
M mlir/lib/Tools/tblgen-lsp-server/TableGenServer.cpp
M mlir/lib/Tools/tblgen-lsp-server/TableGenServer.h
M mlir/tools/mlir-lsp-server/mlir-lsp-server.cpp
M mlir/unittests/CMakeLists.txt
R mlir/unittests/Tools/CMakeLists.txt
R mlir/unittests/Tools/lsp-server-support/CMakeLists.txt
R mlir/unittests/Tools/lsp-server-support/Protocol.cpp
R mlir/unittests/Tools/lsp-server-support/Transport.cpp
Log Message:
-----------
simplified the test a bit
Created using spr 1.3.6
Compare: https://github.com/llvm/llvm-project/compare/dd58a5da59eb...c82b3063b89f
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list