summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2018-10-18 14:41:50 +0000
committerSam McCall <sam.mccall@gmail.com>2018-10-18 14:41:50 +0000
commit3d0adbe63664ac4f7d7f6b4d74851a840097de2b (patch)
tree01048c2e8901aa0c043a00e6f9a556f558f589d1 /llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
parent074c3ae20dda98a57070eadbc44df960884c2939 (diff)
downloadbcm5719-llvm-3d0adbe63664ac4f7d7f6b4d74851a840097de2b.tar.gz
bcm5719-llvm-3d0adbe63664ac4f7d7f6b4d74851a840097de2b.zip
[clangd] Enforce rules around "initialize" request, and create ClangdServer lazily.
Summary: LSP is a slightly awkward map to C++ object lifetimes: the initialize request is part of the protocol and provides information that doesn't change over the lifetime of the server. Until now, we handled this by initializing ClangdServer and ClangdLSPServer right away, and making anything that can be set in the "initialize" request mutable. With this patch, we create ClangdLSPServer immediately, but defer creating ClangdServer until "initialize". This opens the door to passing the relevant initialize params in the constructor and storing them immutably. (That change isn't actually done in this patch). To make this safe, we have the MessageDispatcher enforce that the "initialize" method is called before any other (as required by LSP). That way each method handler can assume Server is initialized, as today. As usual, while implementing this I found places where our test cases violated the protocol. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53398 llvm-svn: 344741
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud