[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap 'launch' request to use typed RequestHandler<>. (PR #133624)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 25 09:27:20 PDT 2025
================
@@ -37,14 +39,12 @@ MakeArgv(const llvm::ArrayRef<std::string> &strs) {
return argv;
}
-static uint32_t SetLaunchFlag(uint32_t flags, const llvm::json::Object *obj,
- llvm::StringRef key, lldb::LaunchFlags mask) {
- if (const auto opt_value = GetBoolean(obj, key)) {
- if (*opt_value)
- flags |= mask;
- else
- flags &= ~mask;
- }
+static uint32_t SetLaunchFlag(uint32_t flags, bool flag,
+ lldb::LaunchFlags mask) {
+ if (flag)
+ flags |= mask;
+ else
+ flags &= ~mask;
----------------
JDevlieghere wrote:
That's the part I was missing, thanks for clarifying. I can't say I'm particularly happy about having to manually keep things in sync, but it does remove the need for the additional complexity that the optionals introduce.
https://github.com/llvm/llvm-project/pull/133624
More information about the lldb-commits
mailing list