[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap 'launch' request to use typed RequestHandler<>. (PR #133624)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 14 08:51:48 PDT 2025
================
@@ -33,15 +35,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 opt,
+ lldb::LaunchFlags mask) {
+ if (opt)
+ flags |= mask;
+ else
+ flags &= ~mask;
return flags;
}
----------------
ashgti wrote:
Converted the bools back to optionals.
https://github.com/llvm/llvm-project/pull/133624
More information about the lldb-commits
mailing list