[Lldb-commits] [lldb] [lldb-dap] Migrating DAP 'initialize' to new typed RequestHandler. (PR #133007)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 26 12:52:09 PDT 2025


ashgti wrote:

> This code seems quite repetitive. Would it be possible to have a `Capabilities` enum and then representing the actual values by something like `map<Capability, bool>` (with std::nullopt replaced by removing the capability from the map). Or even `map<string, bool>` if you don't need to access the capabilities individually (very often)? And maybe the handlers don't even need to return the map, but just a list/vector of "new" capabilities that they enable?

Done. Converted these into `std::set<(Adapter|Client)Feature>` sets for the `Capabilities` type and for the `InitializeRequestArguments`. I adjusted the RequestHandler classes to return a `std::set<AdapterFeature>` now as well.

https://github.com/llvm/llvm-project/pull/133007


More information about the lldb-commits mailing list