1515#include " llvm/ADT/FunctionExtras.h"
1616#include " llvm/Support/Compiler.h"
1717#include " llvm/Support/JSON.h"
18- #include " llvm/Support/Registry.h"
1918#include < memory>
2019#include < optional>
2120#include < type_traits>
@@ -144,14 +143,9 @@ class FeatureModule {
144143
145144// / A FeatureModuleSet is a collection of feature modules installed in clangd.
146145// /
147- // / Modules added with explicit type specification can be looked up by type, or
148- // / used via the FeatureModule interface. This allows individual modules to
149- // / expose a public API. For this reason, there can be only one feature module
150- // / of each type.
151- // /
152- // / Modules added using a base class pointer can be used only via the
153- // / FeatureModule interface and can't be looked up by type, thus custom public
154- // / API (if provided by the module) can't be used.
146+ // / Modules can be looked up by type, or used via the FeatureModule interface.
147+ // / This allows individual modules to expose a public API.
148+ // / For this reason, there can be only one feature module of each type.
155149// /
156150// / The set owns the modules. It is itself owned by main, not ClangdServer.
157151class FeatureModuleSet {
@@ -178,7 +172,6 @@ class FeatureModuleSet {
178172 const_iterator begin () const { return const_iterator (Modules.begin ()); }
179173 const_iterator end () const { return const_iterator (Modules.end ()); }
180174
181- void add (std::unique_ptr<FeatureModule> M);
182175 template <typename Mod> bool add (std::unique_ptr<Mod> M) {
183176 return addImpl (&ID<Mod>::Key, std::move (M), LLVM_PRETTY_FUNCTION);
184177 }
@@ -192,8 +185,6 @@ class FeatureModuleSet {
192185
193186template <typename Mod> int FeatureModuleSet::ID<Mod>::Key;
194187
195- using FeatureModuleRegistry = llvm::Registry<FeatureModule>;
196-
197188} // namespace clangd
198189} // namespace clang
199190#endif
0 commit comments