================ @@ -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:
Right, so in the case where the user didn't specify anything, I'm arguing we shouldn't treat it the same as if it was set to false. Unless the spec says that it being absent should be treated as it being set to false. The code snippet you're pointing out is exactly what I'm worried about: some of these things are set by default and the implementation here shouldn't have to worry about that. https://github.com/llvm/llvm-project/pull/133624 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits