[lldb] Make exe_ctx an optional argument in OptionValueProperties (NFC)
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 2 May 2023 17:31:21 +0000 (10:31 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 2 May 2023 17:36:11 +0000 (10:36 -0700)
The majority of call sites are nullptr as the execution context.
Refactor OptionValueProperties to make the argument optional and
simplify all the callers.

20 files changed:
lldb/include/lldb/Interpreter/OptionValueProperties.h
lldb/source/Core/Debugger.cpp
lldb/source/Core/ModuleList.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/OptionValueProperties.cpp
lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Target/Platform.cpp
lldb/source/Target/Process.cpp
lldb/source/Target/Target.cpp
lldb/source/Target/Thread.cpp
lldb/unittests/Interpreter/TestOptionValue.cpp

index 2666585802d63c7d495052d6d1cbdbf8f35ffa48..b32bb8fa91c85c0a7bbb32482931ea90c0c66462 100644 (file)
@@ -78,13 +78,15 @@ public:
   // Get a property by exact name exists in this property collection, name can
   // not be a path to a property path that refers to a property within a
   // property
-  virtual const Property *GetProperty(const ExecutionContext *exe_ctx,
-
-                                      ConstString name) const;
-
-  virtual const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx,
+  virtual const Property *
+  GetProperty(ConstString name,
+              const ExecutionContext *exe_ctx = nullptr) const;
 
-                                             uint32_t idx) const;
+  virtual const Property *
+  GetPropertyAtIndex(uint32_t idx,
+                     const ExecutionContext *exe_ctx = nullptr) const {
+    return ProtectedGetPropertyAtIndex(idx);
+  }
 
   // Property can be be a property path like
   // "target.process.extra-startup-command"
@@ -94,7 +96,7 @@ public:
                     llvm::StringRef property_path) const;
 
   virtual lldb::OptionValueSP
-  GetPropertyValueAtIndex(const ExecutionContext *exe_ctx, uint32_t idx) const;
+  GetPropertyValueAtIndex(uint32_t idx, const ExecutionContext *exe_ctx) const;
 
   virtual lldb::OptionValueSP GetValueForKey(const ExecutionContext *exe_ctx,
                                              ConstString key) const;
@@ -106,99 +108,91 @@ public:
   Status SetSubValue(const ExecutionContext *exe_ctx, VarSetOperationType op,
                      llvm::StringRef path, llvm::StringRef value) override;
 
-  OptionValueArch *
-  GetPropertyAtIndexAsOptionValueArch(const ExecutionContext *exe_ctx,
-                                      uint32_t idx) const;
+  OptionValueArch *GetPropertyAtIndexAsOptionValueArch(
+      uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
 
-  OptionValueLanguage *
-  GetPropertyAtIndexAsOptionValueLanguage(const ExecutionContext *exe_ctx,
-                                          uint32_t idx) const;
+  OptionValueLanguage *GetPropertyAtIndexAsOptionValueLanguage(
+      uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
 
-  bool SetPropertyAtIndexAsLanguage(const ExecutionContext *exe_ctx,
-                                    uint32_t idx, lldb::LanguageType lang);
+  bool SetPropertyAtIndexAsLanguage(uint32_t idx, lldb::LanguageType lang,
+                                    const ExecutionContext *exe_ctx = nullptr);
 
-  bool GetPropertyAtIndexAsArgs(const ExecutionContext *exe_ctx, uint32_t idx,
-                                Args &args) const;
+  bool
+  GetPropertyAtIndexAsArgs(uint32_t idx, Args &args,
+                           const ExecutionContext *exe_ctx = nullptr) const;
 
-  bool SetPropertyAtIndexFromArgs(const ExecutionContext *exe_ctx, uint32_t idx,
-                                  const Args &args);
+  bool SetPropertyAtIndexFromArgs(uint32_t idx, const Args &args,
+                                  const ExecutionContext *exe_ctx = nullptr);
 
   std::optional<bool>
-  GetPropertyAtIndexAsBoolean(const ExecutionContext *exe_ctx,
-                              uint32_t idx) const;
+  GetPropertyAtIndexAsBoolean(uint32_t idx,
+                              const ExecutionContext *exe_ctx = nullptr) const;
 
-  bool SetPropertyAtIndexAsBoolean(const ExecutionContext *exe_ctx,
-                                   uint32_t idx, bool new_value);
+  bool SetPropertyAtIndexAsBoolean(uint32_t idx, bool new_value,
+                                   const ExecutionContext *exe_ctx = nullptr);
 
-  OptionValueDictionary *
-  GetPropertyAtIndexAsOptionValueDictionary(const ExecutionContext *exe_ctx,
-                                            uint32_t idx) const;
+  OptionValueDictionary *GetPropertyAtIndexAsOptionValueDictionary(
+      uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
 
-  std::optional<int64_t>
-  GetPropertyAtIndexAsEnumeration(const ExecutionContext *exe_ctx,
-                                  uint32_t idx) const;
+  std::optional<int64_t> GetPropertyAtIndexAsEnumeration(
+      uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
 
-  bool SetPropertyAtIndexAsEnumeration(const ExecutionContext *exe_ctx,
-                                       uint32_t idx, int64_t new_value);
+  bool
+  SetPropertyAtIndexAsEnumeration(uint32_t idx, int64_t new_value,
+                                  const ExecutionContext *exe_ctx = nullptr);
 
   const FormatEntity::Entry *
-  GetPropertyAtIndexAsFormatEntity(const ExecutionContext *exe_ctx,
-                                   uint32_t idx);
+  GetPropertyAtIndexAsFormatEntity(uint32_t idx,
+                                   const ExecutionContext *exe_ctx = nullptr);
 
-  const RegularExpression *
-  GetPropertyAtIndexAsOptionValueRegex(const ExecutionContext *exe_ctx,
-                                       uint32_t idx) const;
+  const RegularExpression *GetPropertyAtIndexAsOptionValueRegex(
+      uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
 
-  OptionValueSInt64 *
-  GetPropertyAtIndexAsOptionValueSInt64(const ExecutionContext *exe_ctx,
-                                        uint32_t idx) const;
+  OptionValueSInt64 *GetPropertyAtIndexAsOptionValueSInt64(
+      uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
 
-  OptionValueUInt64 *
-  GetPropertyAtIndexAsOptionValueUInt64(const ExecutionContext *exe_ctx,
-                                        uint32_t idx) const;
+  OptionValueUInt64 *GetPropertyAtIndexAsOptionValueUInt64(
+      uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
 
   std::optional<int64_t>
-  GetPropertyAtIndexAsSInt64(const ExecutionContext *exe_ctx,
-                             uint32_t idx) const;
+  GetPropertyAtIndexAsSInt64(uint32_t idx,
+                             const ExecutionContext *exe_ctx = nullptr) const;
 
-  bool SetPropertyAtIndexAsSInt64(const ExecutionContext *exe_ctx, uint32_t idx,
-                                  int64_t new_value);
+  bool SetPropertyAtIndexAsSInt64(uint32_t idx, int64_t new_value,
+                                  const ExecutionContext *exe_ctx = nullptr);
 
   std::optional<uint64_t>
-  GetPropertyAtIndexAsUInt64(const ExecutionContext *exe_ctx,
-                             uint32_t idx) const;
+  GetPropertyAtIndexAsUInt64(uint32_t idx,
+                             const ExecutionContext *exe_ctx = nullptr) const;
 
-  bool SetPropertyAtIndexAsUInt64(const ExecutionContext *exe_ctx, uint32_t idx,
-                                  uint64_t new_value);
+  bool SetPropertyAtIndexAsUInt64(uint32_t idx, uint64_t new_value,
+                                  const ExecutionContext *exe_ctx = nullptr);
 
   std::optional<llvm::StringRef>
-  GetPropertyAtIndexAsString(const ExecutionContext *exe_ctx,
-                             uint32_t idx) const;
+  GetPropertyAtIndexAsString(uint32_t idx,
+                             const ExecutionContext *exe_ctx = nullptr) const;
 
-  bool SetPropertyAtIndexAsString(const ExecutionContext *exe_ctx, uint32_t idx,
-                                  llvm::StringRef new_value);
+  bool SetPropertyAtIndexAsString(uint32_t idx, llvm::StringRef new_value,
+                                  const ExecutionContext *exe_ctx = nullptr);
 
-  OptionValueString *
-  GetPropertyAtIndexAsOptionValueString(const ExecutionContext *exe_ctx,
-                                        uint32_t idx) const;
+  OptionValueString *GetPropertyAtIndexAsOptionValueString(
+      uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
 
-  OptionValueFileSpec *
-  GetPropertyAtIndexAsOptionValueFileSpec(const ExecutionContext *exe_ctx,
-                                          uint32_t idx) const;
+  OptionValueFileSpec *GetPropertyAtIndexAsOptionValueFileSpec(
+      uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
 
-  FileSpec GetPropertyAtIndexAsFileSpec(const ExecutionContext *exe_ctx,
-                                        uint32_t idx) const;
+  FileSpec
+  GetPropertyAtIndexAsFileSpec(uint32_t idx,
+                               const ExecutionContext *exe_ctx = nullptr) const;
 
-  bool SetPropertyAtIndexAsFileSpec(const ExecutionContext *exe_ctx,
-                                    uint32_t idx, const FileSpec &file_spec);
+  bool SetPropertyAtIndexAsFileSpec(uint32_t idx, const FileSpec &file_spec,
+                                    const ExecutionContext *exe_ctx = nullptr);
 
-  OptionValuePathMappings *
-  GetPropertyAtIndexAsOptionValuePathMappings(const ExecutionContext *exe_ctx,
-                                              uint32_t idx) const;
+  OptionValuePathMappings *GetPropertyAtIndexAsOptionValuePathMappings(
+      uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
 
-  OptionValueFileSpecList *
-  GetPropertyAtIndexAsOptionValueFileSpecList(const ExecutionContext *exe_ctx,
-                                              uint32_t idx) const;
+  OptionValueFileSpecList *GetPropertyAtIndexAsOptionValueFileSpecList(
+      uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
 
   void AppendProperty(ConstString name, llvm::StringRef desc, bool is_global,
                       const lldb::OptionValueSP &value_sp);
index 2e0bbba81536274b8b44f914a446c3e4f31176cd..349f1c91d1e38cd5410912fc1300fb257b818d0c 100644 (file)
@@ -263,46 +263,46 @@ Status Debugger::SetPropertyValue(const ExecutionContext *exe_ctx,
 
 bool Debugger::GetAutoConfirm() const {
   const uint32_t idx = ePropertyAutoConfirm;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value != 0);
 }
 
 const FormatEntity::Entry *Debugger::GetDisassemblyFormat() const {
   const uint32_t idx = ePropertyDisassemblyFormat;
-  return m_collection_sp->GetPropertyAtIndexAsFormatEntity(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsFormatEntity(idx);
 }
 
 const FormatEntity::Entry *Debugger::GetFrameFormat() const {
   const uint32_t idx = ePropertyFrameFormat;
-  return m_collection_sp->GetPropertyAtIndexAsFormatEntity(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsFormatEntity(idx);
 }
 
 const FormatEntity::Entry *Debugger::GetFrameFormatUnique() const {
   const uint32_t idx = ePropertyFrameFormatUnique;
-  return m_collection_sp->GetPropertyAtIndexAsFormatEntity(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsFormatEntity(idx);
 }
 
 uint32_t Debugger::GetStopDisassemblyMaxSize() const {
   const uint32_t idx = ePropertyStopDisassemblyMaxSize;
-  return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_debugger_properties[idx].default_uint_value);
 }
 
 bool Debugger::GetNotifyVoid() const {
   const uint32_t idx = ePropertyNotiftVoid;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value != 0);
 }
 
 llvm::StringRef Debugger::GetPrompt() const {
   const uint32_t idx = ePropertyPrompt;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_cstr_value);
+  return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+      g_debugger_properties[idx].default_cstr_value);
 }
 
 void Debugger::SetPrompt(llvm::StringRef p) {
   const uint32_t idx = ePropertyPrompt;
-  m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, p);
+  m_collection_sp->SetPropertyAtIndexAsString(idx, p);
   llvm::StringRef new_prompt = GetPrompt();
   std::string str =
       lldb_private::ansi::FormatAnsiTerminalCodes(new_prompt, GetUseColor());
@@ -313,31 +313,30 @@ void Debugger::SetPrompt(llvm::StringRef p) {
 
 const FormatEntity::Entry *Debugger::GetThreadFormat() const {
   const uint32_t idx = ePropertyThreadFormat;
-  return m_collection_sp->GetPropertyAtIndexAsFormatEntity(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsFormatEntity(idx);
 }
 
 const FormatEntity::Entry *Debugger::GetThreadStopFormat() const {
   const uint32_t idx = ePropertyThreadStopFormat;
-  return m_collection_sp->GetPropertyAtIndexAsFormatEntity(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsFormatEntity(idx);
 }
 
 lldb::ScriptLanguage Debugger::GetScriptLanguage() const {
   const uint32_t idx = ePropertyScriptLanguage;
   return (lldb::ScriptLanguage)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+      ->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_debugger_properties[idx].default_uint_value);
 }
 
 bool Debugger::SetScriptLanguage(lldb::ScriptLanguage script_lang) {
   const uint32_t idx = ePropertyScriptLanguage;
-  return m_collection_sp->SetPropertyAtIndexAsEnumeration(nullptr, idx,
-                                                          script_lang);
+  return m_collection_sp->SetPropertyAtIndexAsEnumeration(idx, script_lang);
 }
 
 lldb::LanguageType Debugger::GetREPLLanguage() const {
   const uint32_t idx = ePropertyREPLLanguage;
   OptionValueLanguage *value =
-      m_collection_sp->GetPropertyAtIndexAsOptionValueLanguage(nullptr, idx);
+      m_collection_sp->GetPropertyAtIndexAsOptionValueLanguage(idx);
   if (value)
     return value->GetCurrentValue();
   return LanguageType();
@@ -345,13 +344,13 @@ lldb::LanguageType Debugger::GetREPLLanguage() const {
 
 bool Debugger::SetREPLLanguage(lldb::LanguageType repl_lang) {
   const uint32_t idx = ePropertyREPLLanguage;
-  return m_collection_sp->SetPropertyAtIndexAsLanguage(nullptr, idx, repl_lang);
+  return m_collection_sp->SetPropertyAtIndexAsLanguage(idx, repl_lang);
 }
 
 uint32_t Debugger::GetTerminalWidth() const {
   const uint32_t idx = ePropertyTerminalWidth;
-  return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+      g_debugger_properties[idx].default_uint_value);
 }
 
 bool Debugger::SetTerminalWidth(uint32_t term_width) {
@@ -359,95 +358,94 @@ bool Debugger::SetTerminalWidth(uint32_t term_width) {
     handler_sp->TerminalSizeChanged();
 
   const uint32_t idx = ePropertyTerminalWidth;
-  return m_collection_sp->SetPropertyAtIndexAsSInt64(nullptr, idx, term_width);
+  return m_collection_sp->SetPropertyAtIndexAsSInt64(idx, term_width);
 }
 
 bool Debugger::GetUseExternalEditor() const {
   const uint32_t idx = ePropertyUseExternalEditor;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value != 0);
 }
 
 bool Debugger::SetUseExternalEditor(bool b) {
   const uint32_t idx = ePropertyUseExternalEditor;
-  return m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  return m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
 }
 
 llvm::StringRef Debugger::GetExternalEditor() const {
   const uint32_t idx = ePropertyExternalEditor;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_cstr_value);
+  return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+      g_debugger_properties[idx].default_cstr_value);
 }
 
 bool Debugger::SetExternalEditor(llvm::StringRef editor) {
   const uint32_t idx = ePropertyExternalEditor;
-  return m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, editor);
+  return m_collection_sp->SetPropertyAtIndexAsString(idx, editor);
 }
 
 bool Debugger::GetUseColor() const {
   const uint32_t idx = ePropertyUseColor;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value != 0);
 }
 
 bool Debugger::SetUseColor(bool b) {
   const uint32_t idx = ePropertyUseColor;
-  bool ret = m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  bool ret = m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
   SetPrompt(GetPrompt());
   return ret;
 }
 
 bool Debugger::GetShowProgress() const {
   const uint32_t idx = ePropertyShowProgress;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value != 0);
 }
 
 bool Debugger::SetShowProgress(bool show_progress) {
   const uint32_t idx = ePropertyShowProgress;
-  return m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx,
-                                                      show_progress);
+  return m_collection_sp->SetPropertyAtIndexAsBoolean(idx, show_progress);
 }
 
 llvm::StringRef Debugger::GetShowProgressAnsiPrefix() const {
   const uint32_t idx = ePropertyShowProgressAnsiPrefix;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_cstr_value);
+  return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+      g_debugger_properties[idx].default_cstr_value);
 }
 
 llvm::StringRef Debugger::GetShowProgressAnsiSuffix() const {
   const uint32_t idx = ePropertyShowProgressAnsiSuffix;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_cstr_value);
+  return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+      g_debugger_properties[idx].default_cstr_value);
 }
 
 bool Debugger::GetUseAutosuggestion() const {
   const uint32_t idx = ePropertyShowAutosuggestion;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value != 0);
 }
 
 llvm::StringRef Debugger::GetAutosuggestionAnsiPrefix() const {
   const uint32_t idx = ePropertyShowAutosuggestionAnsiPrefix;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_cstr_value);
+  return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+      g_debugger_properties[idx].default_cstr_value);
 }
 
 llvm::StringRef Debugger::GetAutosuggestionAnsiSuffix() const {
   const uint32_t idx = ePropertyShowAutosuggestionAnsiSuffix;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_cstr_value);
+  return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+      g_debugger_properties[idx].default_cstr_value);
 }
 
 bool Debugger::GetUseSourceCache() const {
   const uint32_t idx = ePropertyUseSourceCache;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value != 0);
 }
 
 bool Debugger::SetUseSourceCache(bool b) {
   const uint32_t idx = ePropertyUseSourceCache;
-  bool ret = m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  bool ret = m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
   if (!ret) {
     m_source_file_cache.Clear();
   }
@@ -455,110 +453,110 @@ bool Debugger::SetUseSourceCache(bool b) {
 }
 bool Debugger::GetHighlightSource() const {
   const uint32_t idx = ePropertyHighlightSource;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value);
 }
 
 StopShowColumn Debugger::GetStopShowColumn() const {
   const uint32_t idx = ePropertyStopShowColumn;
   return (lldb::StopShowColumn)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+      ->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_debugger_properties[idx].default_uint_value);
 }
 
 llvm::StringRef Debugger::GetStopShowColumnAnsiPrefix() const {
   const uint32_t idx = ePropertyStopShowColumnAnsiPrefix;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_cstr_value);
+  return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+      g_debugger_properties[idx].default_cstr_value);
 }
 
 llvm::StringRef Debugger::GetStopShowColumnAnsiSuffix() const {
   const uint32_t idx = ePropertyStopShowColumnAnsiSuffix;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_cstr_value);
+  return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+      g_debugger_properties[idx].default_cstr_value);
 }
 
 llvm::StringRef Debugger::GetStopShowLineMarkerAnsiPrefix() const {
   const uint32_t idx = ePropertyStopShowLineMarkerAnsiPrefix;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_cstr_value);
+  return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+      g_debugger_properties[idx].default_cstr_value);
 }
 
 llvm::StringRef Debugger::GetStopShowLineMarkerAnsiSuffix() const {
   const uint32_t idx = ePropertyStopShowLineMarkerAnsiSuffix;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_cstr_value);
+  return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+      g_debugger_properties[idx].default_cstr_value);
 }
 
 uint32_t Debugger::GetStopSourceLineCount(bool before) const {
   const uint32_t idx =
       before ? ePropertyStopLineCountBefore : ePropertyStopLineCountAfter;
-  return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+      g_debugger_properties[idx].default_uint_value);
 }
 
 Debugger::StopDisassemblyType Debugger::GetStopDisassemblyDisplay() const {
   const uint32_t idx = ePropertyStopDisassemblyDisplay;
   return (Debugger::StopDisassemblyType)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+      ->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_debugger_properties[idx].default_uint_value);
 }
 
 uint32_t Debugger::GetDisassemblyLineCount() const {
   const uint32_t idx = ePropertyStopDisassemblyCount;
-  return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+      g_debugger_properties[idx].default_uint_value);
 }
 
 bool Debugger::GetAutoOneLineSummaries() const {
   const uint32_t idx = ePropertyAutoOneLineSummaries;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value != 0);
 }
 
 bool Debugger::GetEscapeNonPrintables() const {
   const uint32_t idx = ePropertyEscapeNonPrintables;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value != 0);
 }
 
 bool Debugger::GetAutoIndent() const {
   const uint32_t idx = ePropertyAutoIndent;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value != 0);
 }
 
 bool Debugger::SetAutoIndent(bool b) {
   const uint32_t idx = ePropertyAutoIndent;
-  return m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  return m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
 }
 
 bool Debugger::GetPrintDecls() const {
   const uint32_t idx = ePropertyPrintDecls;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_debugger_properties[idx].default_uint_value != 0);
 }
 
 bool Debugger::SetPrintDecls(bool b) {
   const uint32_t idx = ePropertyPrintDecls;
-  return m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  return m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
 }
 
 uint32_t Debugger::GetTabSize() const {
   const uint32_t idx = ePropertyTabSize;
-  return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-      .value_or(g_debugger_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_debugger_properties[idx].default_uint_value);
 }
 
 bool Debugger::SetTabSize(uint32_t tab_size) {
   const uint32_t idx = ePropertyTabSize;
-  return m_collection_sp->SetPropertyAtIndexAsUInt64(nullptr, idx, tab_size);
+  return m_collection_sp->SetPropertyAtIndexAsUInt64(idx, tab_size);
 }
 
 lldb::DWIMPrintVerbosity Debugger::GetDWIMPrintVerbosity() const {
   const uint32_t idx = ePropertyDWIMPrintVerbosity;
   return (lldb::DWIMPrintVerbosity)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+      ->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_debugger_properties[idx].default_uint_value);
 }
 
@@ -853,7 +851,7 @@ Debugger::Debugger(lldb::LogOutputCallback log_callback, void *baton)
   }
   OptionValueSInt64 *term_width =
       m_collection_sp->GetPropertyAtIndexAsOptionValueSInt64(
-          nullptr, ePropertyTerminalWidth);
+          ePropertyTerminalWidth);
   term_width->SetMinimumValue(10);
   term_width->SetMaximumValue(1024);
 
@@ -1267,7 +1265,7 @@ void Debugger::CancelInterruptRequest() {
 
 bool Debugger::InterruptRequested() {
   // This is the one we should call internally.  This will return true either
-  // if there's a debugger interrupt and we aren't on the IOHandler thread, 
+  // if there's a debugger interrupt and we aren't on the IOHandler thread,
   // or if we are on the IOHandler thread and there's a CommandInterpreter
   // interrupt.
   if (!IsIOHandlerThreadCurrentThread()) {
@@ -2031,7 +2029,7 @@ void Debugger::HandleDiagnosticEvent(const lldb::EventSP &event_sp) {
 }
 
 bool Debugger::HasIOHandlerThread() const {
-  return m_io_handler_thread.IsJoinable(); 
+  return m_io_handler_thread.IsJoinable();
 }
 
 HostThread Debugger::SetIOHandlerThread(HostThread &new_thread) {
index 9496c53a9390c83898ad7aace7d7f6ffd7a2a811..ee3c2b88bab75b72ea781a16ebce1934bad2e9f5 100644 (file)
@@ -97,79 +97,77 @@ ModuleListProperties::ModuleListProperties() {
 
 bool ModuleListProperties::GetEnableExternalLookup() const {
   const uint32_t idx = ePropertyEnableExternalLookup;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_modulelist_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_modulelist_properties[idx].default_uint_value != 0);
 }
 
 bool ModuleListProperties::SetEnableExternalLookup(bool new_value) {
   return m_collection_sp->SetPropertyAtIndexAsBoolean(
-      nullptr, ePropertyEnableExternalLookup, new_value);
+      ePropertyEnableExternalLookup, new_value);
 }
 
 bool ModuleListProperties::GetEnableBackgroundLookup() const {
   const uint32_t idx = ePropertyEnableBackgroundLookup;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_modulelist_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_modulelist_properties[idx].default_uint_value != 0);
 }
 
 FileSpec ModuleListProperties::GetClangModulesCachePath() const {
   return m_collection_sp
-      ->GetPropertyAtIndexAsOptionValueFileSpec(nullptr,
-                                                ePropertyClangModulesCachePath)
+      ->GetPropertyAtIndexAsOptionValueFileSpec(ePropertyClangModulesCachePath)
       ->GetCurrentValue();
 }
 
 bool ModuleListProperties::SetClangModulesCachePath(const FileSpec &path) {
   return m_collection_sp->SetPropertyAtIndexAsFileSpec(
-      nullptr, ePropertyClangModulesCachePath, path);
+      ePropertyClangModulesCachePath, path);
 }
 
 FileSpec ModuleListProperties::GetLLDBIndexCachePath() const {
   return m_collection_sp
-      ->GetPropertyAtIndexAsOptionValueFileSpec(nullptr,
-                                                ePropertyLLDBIndexCachePath)
+      ->GetPropertyAtIndexAsOptionValueFileSpec(ePropertyLLDBIndexCachePath)
       ->GetCurrentValue();
 }
 
 bool ModuleListProperties::SetLLDBIndexCachePath(const FileSpec &path) {
   return m_collection_sp->SetPropertyAtIndexAsFileSpec(
-      nullptr, ePropertyLLDBIndexCachePath, path);
+      ePropertyLLDBIndexCachePath, path);
 }
 
 bool ModuleListProperties::GetEnableLLDBIndexCache() const {
   const uint32_t idx = ePropertyEnableLLDBIndexCache;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_modulelist_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_modulelist_properties[idx].default_uint_value != 0);
 }
 
 bool ModuleListProperties::SetEnableLLDBIndexCache(bool new_value) {
   return m_collection_sp->SetPropertyAtIndexAsBoolean(
-      nullptr, ePropertyEnableLLDBIndexCache, new_value);
+      ePropertyEnableLLDBIndexCache, new_value);
 }
 
 uint64_t ModuleListProperties::GetLLDBIndexCacheMaxByteSize() {
   const uint32_t idx = ePropertyLLDBIndexCacheMaxByteSize;
-  return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-      .value_or(g_modulelist_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_modulelist_properties[idx].default_uint_value);
 }
 
 uint64_t ModuleListProperties::GetLLDBIndexCacheMaxPercent() {
   const uint32_t idx = ePropertyLLDBIndexCacheMaxPercent;
-  return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-      .value_or(g_modulelist_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_modulelist_properties[idx].default_uint_value);
 }
 
 uint64_t ModuleListProperties::GetLLDBIndexCacheExpirationDays() {
   const uint32_t idx = ePropertyLLDBIndexCacheExpirationDays;
-  return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-      .value_or(g_modulelist_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_modulelist_properties[idx].default_uint_value);
 }
 
 void ModuleListProperties::UpdateSymlinkMappings() {
-  FileSpecList list = m_collection_sp
-                          ->GetPropertyAtIndexAsOptionValueFileSpecList(
-                              nullptr, ePropertySymLinkPaths)
-                          ->GetCurrentValue();
+  FileSpecList list =
+      m_collection_sp
+          ->GetPropertyAtIndexAsOptionValueFileSpecList(ePropertySymLinkPaths)
+          ->GetCurrentValue();
   llvm::sys::ScopedWriter lock(m_symlink_paths_mutex);
   const bool notify = false;
   m_symlink_paths.Clear(notify);
@@ -188,8 +186,8 @@ PathMappingList ModuleListProperties::GetSymlinkMappings() const {
 
 bool ModuleListProperties::GetLoadSymbolOnDemand() {
   const uint32_t idx = ePropertyLoadSymbolOnDemand;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_modulelist_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_modulelist_properties[idx].default_uint_value != 0);
 }
 
 ModuleList::ModuleList() : m_modules(), m_modules_mutex() {}
index 7e08653ad141eb72782aa319bc759831d82df838..b251dfe245ffd001e62606acc16d30fc5d15b63d 100644 (file)
@@ -146,73 +146,73 @@ CommandInterpreter::CommandInterpreter(Debugger &debugger,
 
 bool CommandInterpreter::GetExpandRegexAliases() const {
   const uint32_t idx = ePropertyExpandRegexAliases;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 bool CommandInterpreter::GetPromptOnQuit() const {
   const uint32_t idx = ePropertyPromptOnQuit;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 void CommandInterpreter::SetPromptOnQuit(bool enable) {
   const uint32_t idx = ePropertyPromptOnQuit;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, enable);
 }
 
 bool CommandInterpreter::GetSaveSessionOnQuit() const {
   const uint32_t idx = ePropertySaveSessionOnQuit;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 void CommandInterpreter::SetSaveSessionOnQuit(bool enable) {
   const uint32_t idx = ePropertySaveSessionOnQuit;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, enable);
 }
 
 bool CommandInterpreter::GetOpenTranscriptInEditor() const {
   const uint32_t idx = ePropertyOpenTranscriptInEditor;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 void CommandInterpreter::SetOpenTranscriptInEditor(bool enable) {
   const uint32_t idx = ePropertyOpenTranscriptInEditor;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, enable);
 }
 
 FileSpec CommandInterpreter::GetSaveSessionDirectory() const {
   const uint32_t idx = ePropertySaveSessionDirectory;
-  return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
 }
 
 void CommandInterpreter::SetSaveSessionDirectory(llvm::StringRef path) {
   const uint32_t idx = ePropertySaveSessionDirectory;
-  m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path);
+  m_collection_sp->SetPropertyAtIndexAsString(idx, path);
 }
 
 bool CommandInterpreter::GetEchoCommands() const {
   const uint32_t idx = ePropertyEchoCommands;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 void CommandInterpreter::SetEchoCommands(bool enable) {
   const uint32_t idx = ePropertyEchoCommands;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, enable);
 }
 
 bool CommandInterpreter::GetEchoCommentCommands() const {
   const uint32_t idx = ePropertyEchoCommentCommands;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 void CommandInterpreter::SetEchoCommentCommands(bool enable) {
   const uint32_t idx = ePropertyEchoCommentCommands;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, enable);
 }
 
 void CommandInterpreter::AllowExitCodeOnQuit(bool allow) {
@@ -246,26 +246,26 @@ void CommandInterpreter::ResolveCommand(const char *command_line,
 
 bool CommandInterpreter::GetStopCmdSourceOnError() const {
   const uint32_t idx = ePropertyStopCmdSourceOnError;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 bool CommandInterpreter::GetSpaceReplPrompts() const {
   const uint32_t idx = ePropertySpaceReplPrompts;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 bool CommandInterpreter::GetRepeatPreviousCommand() const {
   const uint32_t idx = ePropertyRepeatPreviousCommand;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 bool CommandInterpreter::GetRequireCommandOverwrite() const {
   const uint32_t idx = ePropertyRequireCommandOverwrite;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 void CommandInterpreter::Initialize() {
@@ -1690,20 +1690,19 @@ CommandObject *CommandInterpreter::BuildAliasResult(
           return nullptr;
         }
         llvm::StringRef arg_text = entry.ref();
-        if (strpos - start_fudge + arg_text.size() + len_fudge 
-            raw_input_string.size()) {
+        if (strpos - start_fudge + arg_text.size() + len_fudge >
+            raw_input_string.size()) {
           result.AppendError("Unmatched quote at command end.");
-          return nullptr;  
+          return nullptr;
         }
         raw_input_string = raw_input_string.erase(
-            strpos - start_fudge, 
+            strpos - start_fudge,
             strlen(cmd_args.GetArgumentAtIndex(index)) + len_fudge);
       }
       if (quote_char == '\0')
         result_str.Printf("%s", cmd_args.GetArgumentAtIndex(index));
       else
-        result_str.Printf("%c%s%c", quote_char, 
-                          entry.c_str(), quote_char);
+        result_str.Printf("%c%s%c", quote_char, entry.c_str(), quote_char);
     }
   }
 
@@ -1760,7 +1759,7 @@ Status CommandInterpreter::PreprocessCommand(std::string &command) {
     command.insert(start_backtick, std::string(expr_str));
     pos = start_backtick + expr_str.size();
   }
-  return error;                        
+  return error;
 }
 
 Status
@@ -1795,7 +1794,7 @@ CommandInterpreter::PreprocessToken(std::string &expr_str) {
           expr_result_valobj_sp->GetQualifiedRepresentationIfAvailable(
               expr_result_valobj_sp->GetDynamicValueType(), true);
     if (expr_result_valobj_sp->ResolveValue(scalar)) {
-      
+
       StreamString value_strm;
       const bool show_type = false;
       scalar.GetValue(&value_strm, show_type);
@@ -1983,11 +1982,11 @@ bool CommandInterpreter::HandleCommand(const char *command_line,
 
   CommandObject *cmd_obj = ResolveCommandImpl(command_string, result);
 
-  // We have to preprocess the whole command string for Raw commands, since we 
+  // We have to preprocess the whole command string for Raw commands, since we
   // don't know the structure of the command.  For parsed commands, we only
   // treat backticks as quote characters specially.
   // FIXME: We probably want to have raw commands do their own preprocessing.
-  // For instance, I don't think people expect substitution in expr expressions. 
+  // For instance, I don't think people expect substitution in expr expressions.
   if (cmd_obj && cmd_obj->WantsRawCommandString()) {
     Status error(PreprocessCommand(command_string));
 
@@ -3395,8 +3394,8 @@ CommandInterpreterRunResult CommandInterpreter::RunCommandInterpreter(
     // If the current thread is not managed by a host thread, we won't detect
     // that this IS the CommandInterpreter IOHandler thread, so make it so:
     HostThread new_io_handler_thread(Host::GetCurrentThread());
-    HostThread old_io_handler_thread 
-        m_debugger.SetIOHandlerThread(new_io_handler_thread);
+    HostThread old_io_handler_thread =
+        m_debugger.SetIOHandlerThread(new_io_handler_thread);
     m_debugger.RunIOHandlers();
     m_debugger.SetIOHandlerThread(old_io_handler_thread);
 
index 0861aeeeaf0dc3f00d6c1abf4c716d20db579a96..7f402374a12ecf7c664b06fc94e99e74f7126977 100644 (file)
@@ -30,7 +30,8 @@ void OptionValueProperties::Initialize(const PropertyDefinitions &defs) {
   for (const auto &definition : defs) {
     Property property(definition);
     assert(property.IsValid());
-    m_name_to_index.Append(ConstString(property.GetName()), m_properties.size());
+    m_name_to_index.Append(ConstString(property.GetName()),
+                           m_properties.size());
     property.GetValue()->SetParent(shared_from_this());
     m_properties.push_back(property);
   }
@@ -79,7 +80,7 @@ OptionValueProperties::GetValueForKey(const ExecutionContext *exe_ctx,
   lldb::OptionValueSP value_sp;
   size_t idx = m_name_to_index.Find(key, SIZE_MAX);
   if (idx < m_properties.size())
-    value_sp = GetPropertyAtIndex(exe_ctx, idx)->GetValue();
+    value_sp = GetPropertyAtIndex(idx, exe_ctx)->GetValue();
   return value_sp;
 }
 
@@ -153,34 +154,26 @@ Status OptionValueProperties::SetSubValue(const ExecutionContext *exe_ctx,
     // Don't set an error if the path contained .experimental. - those are
     // allowed to be missing and should silently fail.
     if (!name_contains_experimental && error.AsCString() == nullptr) {
-      error.SetErrorStringWithFormat("invalid value path '%s'", name.str().c_str());
+      error.SetErrorStringWithFormat("invalid value path '%s'",
+                                     name.str().c_str());
     }
   }
   return error;
 }
 
-uint32_t
-OptionValueProperties::GetPropertyIndex(ConstString name) const {
+uint32_t OptionValueProperties::GetPropertyIndex(ConstString name) const {
   return m_name_to_index.Find(name, SIZE_MAX);
 }
 
 const Property *
-OptionValueProperties::GetProperty(const ExecutionContext *exe_ctx,
-
-                                   ConstString name) const {
-  return GetPropertyAtIndex(exe_ctx, m_name_to_index.Find(name, SIZE_MAX));
+OptionValueProperties::GetProperty(ConstString name,
+                                   const ExecutionContext *exe_ctx) const {
+  return GetPropertyAtIndex(m_name_to_index.Find(name, SIZE_MAX), exe_ctx);
 }
 
-const Property *
-OptionValueProperties::GetPropertyAtIndex(const ExecutionContext *exe_ctx,
-                                          uint32_t idx) const {
-  return ProtectedGetPropertyAtIndex(idx);
-}
-
-lldb::OptionValueSP
-OptionValueProperties::GetPropertyValueAtIndex(const ExecutionContext *exe_ctx,
-                                               uint32_t idx) const {
-  const Property *setting = GetPropertyAtIndex(exe_ctx, idx);
+lldb::OptionValueSP OptionValueProperties::GetPropertyValueAtIndex(
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  const Property *setting = GetPropertyAtIndex(idx, exe_ctx);
   if (setting)
     return setting->GetValue();
   return OptionValueSP();
@@ -188,8 +181,8 @@ OptionValueProperties::GetPropertyValueAtIndex(const ExecutionContext *exe_ctx,
 
 OptionValuePathMappings *
 OptionValueProperties::GetPropertyAtIndexAsOptionValuePathMappings(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  OptionValueSP value_sp(GetPropertyValueAtIndex(exe_ctx, idx));
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  OptionValueSP value_sp(GetPropertyValueAtIndex(idx, exe_ctx));
   if (value_sp)
     return value_sp->GetAsPathMappings();
   return nullptr;
@@ -197,16 +190,16 @@ OptionValueProperties::GetPropertyAtIndexAsOptionValuePathMappings(
 
 OptionValueFileSpecList *
 OptionValueProperties::GetPropertyAtIndexAsOptionValueFileSpecList(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  OptionValueSP value_sp(GetPropertyValueAtIndex(exe_ctx, idx));
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  OptionValueSP value_sp(GetPropertyValueAtIndex(idx, exe_ctx));
   if (value_sp)
     return value_sp->GetAsFileSpecList();
   return nullptr;
 }
 
 OptionValueArch *OptionValueProperties::GetPropertyAtIndexAsOptionValueArch(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property)
     return property->GetValue()->GetAsArch();
   return nullptr;
@@ -214,16 +207,16 @@ OptionValueArch *OptionValueProperties::GetPropertyAtIndexAsOptionValueArch(
 
 OptionValueLanguage *
 OptionValueProperties::GetPropertyAtIndexAsOptionValueLanguage(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property)
     return property->GetValue()->GetAsLanguage();
   return nullptr;
 }
 
 bool OptionValueProperties::SetPropertyAtIndexAsLanguage(
-    const ExecutionContext *exe_ctx, uint32_t idx, const LanguageType lang) {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const LanguageType lang, const ExecutionContext *exe_ctx) {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -233,8 +226,8 @@ bool OptionValueProperties::SetPropertyAtIndexAsLanguage(
 }
 
 bool OptionValueProperties::GetPropertyAtIndexAsArgs(
-    const ExecutionContext *exe_ctx, uint32_t idx, Args &args) const {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, Args &args, const ExecutionContext *exe_ctx) const {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (!property)
     return false;
 
@@ -264,8 +257,8 @@ bool OptionValueProperties::GetPropertyAtIndexAsArgs(
 }
 
 bool OptionValueProperties::SetPropertyAtIndexFromArgs(
-    const ExecutionContext *exe_ctx, uint32_t idx, const Args &args) {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const Args &args, const ExecutionContext *exe_ctx) {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (!property)
     return false;
 
@@ -289,8 +282,8 @@ bool OptionValueProperties::SetPropertyAtIndexFromArgs(
 }
 
 std::optional<bool> OptionValueProperties::GetPropertyAtIndexAsBoolean(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  if (const Property *property = GetPropertyAtIndex(exe_ctx, idx)) {
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  if (const Property *property = GetPropertyAtIndex(idx, exe_ctx)) {
     if (OptionValue *value = property->GetValue().get())
       return value->GetBooleanValue();
   }
@@ -298,8 +291,8 @@ std::optional<bool> OptionValueProperties::GetPropertyAtIndexAsBoolean(
 }
 
 bool OptionValueProperties::SetPropertyAtIndexAsBoolean(
-    const ExecutionContext *exe_ctx, uint32_t idx, bool new_value) {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, bool new_value, const ExecutionContext *exe_ctx) {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value) {
@@ -312,16 +305,16 @@ bool OptionValueProperties::SetPropertyAtIndexAsBoolean(
 
 OptionValueDictionary *
 OptionValueProperties::GetPropertyAtIndexAsOptionValueDictionary(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property)
     return property->GetValue()->GetAsDictionary();
   return nullptr;
 }
 
 std::optional<int64_t> OptionValueProperties::GetPropertyAtIndexAsEnumeration(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  if (const Property *property = GetPropertyAtIndex(exe_ctx, idx)) {
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  if (const Property *property = GetPropertyAtIndex(idx, exe_ctx)) {
     if (OptionValue *value = property->GetValue().get())
       return value->GetEnumerationValue();
   }
@@ -329,8 +322,8 @@ std::optional<int64_t> OptionValueProperties::GetPropertyAtIndexAsEnumeration(
 }
 
 bool OptionValueProperties::SetPropertyAtIndexAsEnumeration(
-    const ExecutionContext *exe_ctx, uint32_t idx, int64_t new_value) {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, int64_t new_value, const ExecutionContext *exe_ctx) {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -341,8 +334,8 @@ bool OptionValueProperties::SetPropertyAtIndexAsEnumeration(
 
 const FormatEntity::Entry *
 OptionValueProperties::GetPropertyAtIndexAsFormatEntity(
-    const ExecutionContext *exe_ctx, uint32_t idx) {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const ExecutionContext *exe_ctx) {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -353,8 +346,8 @@ OptionValueProperties::GetPropertyAtIndexAsFormatEntity(
 
 OptionValueFileSpec *
 OptionValueProperties::GetPropertyAtIndexAsOptionValueFileSpec(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -364,8 +357,8 @@ OptionValueProperties::GetPropertyAtIndexAsOptionValueFileSpec(
 }
 
 FileSpec OptionValueProperties::GetPropertyAtIndexAsFileSpec(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -375,9 +368,9 @@ FileSpec OptionValueProperties::GetPropertyAtIndexAsFileSpec(
 }
 
 bool OptionValueProperties::SetPropertyAtIndexAsFileSpec(
-    const ExecutionContext *exe_ctx, uint32_t idx,
-    const FileSpec &new_file_spec) {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const FileSpec &new_file_spec,
+    const ExecutionContext *exe_ctx) {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -388,8 +381,8 @@ bool OptionValueProperties::SetPropertyAtIndexAsFileSpec(
 
 const RegularExpression *
 OptionValueProperties::GetPropertyAtIndexAsOptionValueRegex(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -399,8 +392,8 @@ OptionValueProperties::GetPropertyAtIndexAsOptionValueRegex(
 }
 
 OptionValueSInt64 *OptionValueProperties::GetPropertyAtIndexAsOptionValueSInt64(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -410,8 +403,8 @@ OptionValueSInt64 *OptionValueProperties::GetPropertyAtIndexAsOptionValueSInt64(
 }
 
 OptionValueUInt64 *OptionValueProperties::GetPropertyAtIndexAsOptionValueUInt64(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -421,8 +414,8 @@ OptionValueUInt64 *OptionValueProperties::GetPropertyAtIndexAsOptionValueUInt64(
 }
 
 std::optional<int64_t> OptionValueProperties::GetPropertyAtIndexAsSInt64(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  if (const Property *property = GetPropertyAtIndex(exe_ctx, idx)) {
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  if (const Property *property = GetPropertyAtIndex(idx, exe_ctx)) {
     if (OptionValue *value = property->GetValue().get())
       return value->GetSInt64Value();
   }
@@ -430,8 +423,8 @@ std::optional<int64_t> OptionValueProperties::GetPropertyAtIndexAsSInt64(
 }
 
 bool OptionValueProperties::SetPropertyAtIndexAsSInt64(
-    const ExecutionContext *exe_ctx, uint32_t idx, int64_t new_value) {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, int64_t new_value, const ExecutionContext *exe_ctx) {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -442,8 +435,8 @@ bool OptionValueProperties::SetPropertyAtIndexAsSInt64(
 
 std::optional<llvm::StringRef>
 OptionValueProperties::GetPropertyAtIndexAsString(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  if (const Property *property = GetPropertyAtIndex(exe_ctx, idx)) {
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  if (const Property *property = GetPropertyAtIndex(idx, exe_ctx)) {
     if (OptionValue *value = property->GetValue().get())
       return value->GetStringValue();
   }
@@ -451,8 +444,8 @@ OptionValueProperties::GetPropertyAtIndexAsString(
 }
 
 bool OptionValueProperties::SetPropertyAtIndexAsString(
-    const ExecutionContext *exe_ctx, uint32_t idx, llvm::StringRef new_value) {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, llvm::StringRef new_value, const ExecutionContext *exe_ctx) {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -462,16 +455,16 @@ bool OptionValueProperties::SetPropertyAtIndexAsString(
 }
 
 OptionValueString *OptionValueProperties::GetPropertyAtIndexAsOptionValueString(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  OptionValueSP value_sp(GetPropertyValueAtIndex(exe_ctx, idx));
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  OptionValueSP value_sp(GetPropertyValueAtIndex(idx, exe_ctx));
   if (value_sp)
     return value_sp->GetAsString();
   return nullptr;
 }
 
 std::optional<uint64_t> OptionValueProperties::GetPropertyAtIndexAsUInt64(
-    const ExecutionContext *exe_ctx, uint32_t idx) const {
-  if (const Property *property = GetPropertyAtIndex(exe_ctx, idx)) {
+    uint32_t idx, const ExecutionContext *exe_ctx) const {
+  if (const Property *property = GetPropertyAtIndex(idx, exe_ctx)) {
     if (OptionValue *value = property->GetValue().get())
       return value->GetUInt64Value();
   }
@@ -479,8 +472,8 @@ std::optional<uint64_t> OptionValueProperties::GetPropertyAtIndexAsUInt64(
 }
 
 bool OptionValueProperties::SetPropertyAtIndexAsUInt64(
-    const ExecutionContext *exe_ctx, uint32_t idx, uint64_t new_value) {
-  const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+    uint32_t idx, uint64_t new_value, const ExecutionContext *exe_ctx) {
+  const Property *property = GetPropertyAtIndex(idx, exe_ctx);
   if (property) {
     OptionValue *value = property->GetValue().get();
     if (value)
@@ -524,7 +517,7 @@ void OptionValueProperties::DumpValue(const ExecutionContext *exe_ctx,
                                       Stream &strm, uint32_t dump_mask) {
   const size_t num_properties = m_properties.size();
   for (size_t i = 0; i < num_properties; ++i) {
-    const Property *property = GetPropertyAtIndex(exe_ctx, i);
+    const Property *property = GetPropertyAtIndex(i, exe_ctx);
     if (property) {
       OptionValue *option_value = property->GetValue().get();
       assert(option_value);
@@ -541,7 +534,7 @@ OptionValueProperties::ToJSON(const ExecutionContext *exe_ctx) {
   llvm::json::Object json_properties;
   const size_t num_properties = m_properties.size();
   for (size_t i = 0; i < num_properties; ++i) {
-    const Property *property = GetPropertyAtIndex(exe_ctx, i);
+    const Property *property = GetPropertyAtIndex(i, exe_ctx);
     if (property) {
       OptionValue *option_value = property->GetValue().get();
       assert(option_value);
@@ -555,7 +548,8 @@ OptionValueProperties::ToJSON(const ExecutionContext *exe_ctx) {
 Status OptionValueProperties::DumpPropertyValue(const ExecutionContext *exe_ctx,
                                                 Stream &strm,
                                                 llvm::StringRef property_path,
-                                                uint32_t dump_mask, bool is_json) {
+                                                uint32_t dump_mask,
+                                                bool is_json) {
   Status error;
   lldb::OptionValueSP value_sp(GetSubValue(exe_ctx, property_path, error));
   if (value_sp) {
@@ -566,7 +560,9 @@ Status OptionValueProperties::DumpPropertyValue(const ExecutionContext *exe_ctx,
         strm.PutChar(' ');
     }
     if (is_json) {
-      strm.Printf("%s", llvm::formatv("{0:2}", value_sp->ToJSON(exe_ctx)).str().c_str());
+      strm.Printf(
+          "%s",
+          llvm::formatv("{0:2}", value_sp->ToJSON(exe_ctx)).str().c_str());
     } else
       value_sp->DumpValue(exe_ctx, strm, dump_mask);
   }
@@ -617,7 +613,7 @@ OptionValueProperties::GetPropertyAtPath(const ExecutionContext *exe_ctx,
   } else
     key.SetString(name);
 
-  property = GetProperty(exe_ctx, key);
+  property = GetProperty(key, exe_ctx);
   if (sub_name.empty() || !property)
     return property;
 
index 9ab8bf3fc4d4088cf94101cab4c530af1bc6560b..be0ccd390b7f9fdf17898cc27c726508b80eaf1e 100644 (file)
@@ -113,16 +113,13 @@ public:
 
   bool GetLoadKexts() const {
     const uint32_t idx = ePropertyLoadKexts;
-    return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-        .value_or(
-            g_dynamicloaderdarwinkernel_properties[idx].default_uint_value !=
-            0);
+    return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+        g_dynamicloaderdarwinkernel_properties[idx].default_uint_value != 0);
   }
 
   KASLRScanType GetScanType() const {
     const uint32_t idx = ePropertyScanType;
-    return (KASLRScanType)m_collection_sp
-        ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+    return (KASLRScanType)m_collection_sp->GetPropertyAtIndexAsEnumeration(idx)
         .value_or(
             g_dynamicloaderdarwinkernel_properties[idx].default_uint_value);
   }
index e62ac79d798daeee1352389385532bc243372820..e9eddd023ba528e4140f70cd2025ac947c750cdb 100644 (file)
@@ -100,7 +100,7 @@ public:
 
   EnableJITLoaderGDB GetEnable() const {
     return (EnableJITLoaderGDB)m_collection_sp
-        ->GetPropertyAtIndexAsEnumeration(nullptr, ePropertyEnable)
+        ->GetPropertyAtIndexAsEnumeration(ePropertyEnable)
         .value_or(
             g_jitloadergdb_properties[ePropertyEnable].default_uint_value);
   }
index 8ae1186da3bde19d8cb957656dd40a792126b62e..4f1ce5c6405132ededfa51013b39166f0d79064c 100644 (file)
@@ -91,13 +91,13 @@ public:
 
   llvm::Triple::EnvironmentType ABI() const {
     return (llvm::Triple::EnvironmentType)m_collection_sp
-        ->GetPropertyAtIndexAsEnumeration(nullptr, ePropertyABI)
+        ->GetPropertyAtIndexAsEnumeration(ePropertyABI)
         .value_or(llvm::Triple::UnknownEnvironment);
   }
 
   OptionValueDictionary *ModuleABIMap() const {
     return m_collection_sp->GetPropertyAtIndexAsOptionValueDictionary(
-        nullptr, ePropertyModuleABIMap);
+        ePropertyModuleABIMap);
   }
 };
 
index 6993fd74346581007dc371d48bd171df1aa5752c..87586e13fe7a7a6b1bb2cfaf31ace9442cacff74 100644 (file)
@@ -136,7 +136,7 @@ public:
   const char *GetIgnoredExceptions() const {
     const uint32_t idx = ePropertyIgnoredExceptions;
     const OptionValueString *option_value =
-        m_collection_sp->GetPropertyAtIndexAsOptionValueString(nullptr, idx);
+        m_collection_sp->GetPropertyAtIndexAsOptionValueString(idx);
     assert(option_value);
     return option_value->GetCurrentValue();
   }
@@ -144,7 +144,7 @@ public:
   OptionValueString *GetIgnoredExceptionValue() {
     const uint32_t idx = ePropertyIgnoredExceptions;
     OptionValueString *option_value =
-        m_collection_sp->GetPropertyAtIndexAsOptionValueString(nullptr, idx);
+        m_collection_sp->GetPropertyAtIndexAsOptionValueString(idx);
     assert(option_value);
     return option_value;
   }
index c08524f8db111d97e708975e73faf3cef10263f3..1a9229d76f439fb3fd07e116b19c271d43d35a4d 100644 (file)
@@ -202,8 +202,7 @@ public:
   FileSpecList GetKextDirectories() const {
     const uint32_t idx = ePropertyKextDirectories;
     const OptionValueFileSpecList *option_value =
-        m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
-                                                                     idx);
+        m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
     assert(option_value);
     return option_value->GetCurrentValue();
   }
index 9c099508e6e148e6c17421faec3bb179dc2b8108..5510baaab3ac0fa34946d9e0f13a39420d1bcac3 100644 (file)
@@ -41,34 +41,29 @@ public:
   }
 
   llvm::StringRef GetArchitecture() {
-    return m_collection_sp
-        ->GetPropertyAtIndexAsString(nullptr, ePropertyArchitecture)
+    return m_collection_sp->GetPropertyAtIndexAsString(ePropertyArchitecture)
         .value_or("");
   }
 
   FileSpec GetEmulatorPath() {
-    return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr,
-                                                         ePropertyEmulatorPath);
+    return m_collection_sp->GetPropertyAtIndexAsFileSpec(ePropertyEmulatorPath);
   }
 
   Args GetEmulatorArgs() {
     Args result;
-    m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyEmulatorArgs,
-                                              result);
+    m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyEmulatorArgs, result);
     return result;
   }
 
   Environment GetEmulatorEnvVars() {
     Args args;
-    m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyEmulatorEnvVars,
-                                              args);
+    m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyEmulatorEnvVars, args);
     return Environment(args);
   }
 
   Environment GetTargetEnvVars() {
     Args args;
-    m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyTargetEnvVars,
-                                              args);
+    m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyTargetEnvVars, args);
     return Environment(args);
   }
 };
index 668b7b0ebf9f0e676c8587e0ed65c3cded1d21d6..3ac059a05122ee970fd5f270c5ccc292a779e654 100644 (file)
@@ -78,7 +78,7 @@ public:
 
   uint64_t GetPacketTimeout() {
     const uint32_t idx = ePropertyKDPPacketTimeout;
-    return m_collection_sp->GetPropertyAtIndexAsUInt64(NULL, idx).value_or(
+    return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
         g_processkdp_properties[idx].default_uint_value);
   }
 };
index a50327fdf2016ac74b754f0b53a6cf0849f9b280..06f57967c5acb868d8391600ff522689034ba983 100644 (file)
@@ -142,30 +142,29 @@ public:
 
   uint64_t GetPacketTimeout() {
     const uint32_t idx = ePropertyPacketTimeout;
-    return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-        .value_or(g_processgdbremote_properties[idx].default_uint_value);
+    return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+        g_processgdbremote_properties[idx].default_uint_value);
   }
 
   bool SetPacketTimeout(uint64_t timeout) {
     const uint32_t idx = ePropertyPacketTimeout;
-    return m_collection_sp->SetPropertyAtIndexAsUInt64(nullptr, idx, timeout);
+    return m_collection_sp->SetPropertyAtIndexAsUInt64(idx, timeout);
   }
 
   FileSpec GetTargetDefinitionFile() const {
     const uint32_t idx = ePropertyTargetDefinitionFile;
-    return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+    return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
   }
 
   bool GetUseSVR4() const {
     const uint32_t idx = ePropertyUseSVR4;
-    return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-        .value_or(g_processgdbremote_properties[idx].default_uint_value != 0);
+    return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+        g_processgdbremote_properties[idx].default_uint_value != 0);
   }
 
   bool GetUseGPacketForReading() const {
     const uint32_t idx = ePropertyUseGPacketForReading;
-    return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-        .value_or(true);
+    return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(true);
   }
 };
 
index 2504d16e487d80e952c808dc137dbbbf249948ba..375b171e6d6ce30da31bdaf6d311ec20113d8369 100644 (file)
@@ -131,14 +131,14 @@ public:
 
   bool GetEnableOnStartup() const {
     const uint32_t idx = ePropertyEnableOnStartup;
-    return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-        .value_or(g_darwinlog_properties[idx].default_uint_value != 0);
+    return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+        g_darwinlog_properties[idx].default_uint_value != 0);
   }
 
   llvm::StringRef GetAutoEnableOptions() const {
     const uint32_t idx = ePropertyAutoEnableOptions;
-    return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-        .value_or(g_darwinlog_properties[idx].default_cstr_value);
+    return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+        g_darwinlog_properties[idx].default_cstr_value);
   }
 
   const char *GetLoggingModuleName() const { return "libsystem_trace.dylib"; }
index 999acab9ea5bfb20a7053649ba76d4c0e2cee6d7..ff3abd6fb902148dd700074c8034a0c2350f3be4 100644 (file)
@@ -125,8 +125,7 @@ public:
   }
 
   bool IgnoreFileIndexes() const {
-    return m_collection_sp
-        ->GetPropertyAtIndexAsBoolean(nullptr, ePropertyIgnoreIndexes)
+    return m_collection_sp->GetPropertyAtIndexAsBoolean(ePropertyIgnoreIndexes)
         .value_or(false);
   }
 };
index 5c66c9994fc3474fe7ff472458446a84cb824d19..d141d05685d621e52dcbbb84868cf181bcf4dee7 100644 (file)
@@ -99,29 +99,29 @@ PlatformProperties::PlatformProperties() {
 
 bool PlatformProperties::GetUseModuleCache() const {
   const auto idx = ePropertyUseModuleCache;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_platform_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_platform_properties[idx].default_uint_value != 0);
 }
 
 bool PlatformProperties::SetUseModuleCache(bool use_module_cache) {
-  return m_collection_sp->SetPropertyAtIndexAsBoolean(
-      nullptr, ePropertyUseModuleCache, use_module_cache);
+  return m_collection_sp->SetPropertyAtIndexAsBoolean(ePropertyUseModuleCache,
+                                                      use_module_cache);
 }
 
 FileSpec PlatformProperties::GetModuleCacheDirectory() const {
   return m_collection_sp->GetPropertyAtIndexAsFileSpec(
-      nullptr, ePropertyModuleCacheDirectory);
+      ePropertyModuleCacheDirectory);
 }
 
 bool PlatformProperties::SetModuleCacheDirectory(const FileSpec &dir_spec) {
   return m_collection_sp->SetPropertyAtIndexAsFileSpec(
-      nullptr, ePropertyModuleCacheDirectory, dir_spec);
+      ePropertyModuleCacheDirectory, dir_spec);
 }
 
 void PlatformProperties::SetDefaultModuleCacheDirectory(
     const FileSpec &dir_spec) {
   auto f_spec_opt = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpec(
-      nullptr, ePropertyModuleCacheDirectory);
+      ePropertyModuleCacheDirectory);
   assert(f_spec_opt);
   f_spec_opt->SetDefaultValue(dir_spec);
 }
index 59d5afaccb4d7f1d65abc5223e74650c632bd086..2e7e8e6721bd60b9c1db363a3aea42ae89e2de5b 100644 (file)
@@ -92,8 +92,9 @@ class ProcessOptionValueProperties
 public:
   ProcessOptionValueProperties(ConstString name) : Cloneable(name) {}
 
-  const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx,
-                                     uint32_t idx) const override {
+  const Property *
+  GetPropertyAtIndex(uint32_t idx,
+                     const ExecutionContext *exe_ctx) const override {
     // When getting the value for a key from the process options, we will
     // always try and grab the setting from the current process if there is
     // one. Else we just use the one from this instance.
@@ -189,170 +190,169 @@ ProcessProperties::~ProcessProperties() = default;
 
 bool ProcessProperties::GetDisableMemoryCache() const {
   const uint32_t idx = ePropertyDisableMemCache;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_process_properties[idx].default_uint_value != 0);
 }
 
 uint64_t ProcessProperties::GetMemoryCacheLineSize() const {
   const uint32_t idx = ePropertyMemCacheLineSize;
-  return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_process_properties[idx].default_uint_value);
 }
 
 Args ProcessProperties::GetExtraStartupCommands() const {
   Args args;
   const uint32_t idx = ePropertyExtraStartCommand;
-  m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, idx, args);
+  m_collection_sp->GetPropertyAtIndexAsArgs(idx, args);
   return args;
 }
 
 void ProcessProperties::SetExtraStartupCommands(const Args &args) {
   const uint32_t idx = ePropertyExtraStartCommand;
-  m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, args);
+  m_collection_sp->SetPropertyAtIndexFromArgs(idx, args);
 }
 
 FileSpec ProcessProperties::GetPythonOSPluginPath() const {
   const uint32_t idx = ePropertyPythonOSPluginPath;
-  return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
 }
 
 uint32_t ProcessProperties::GetVirtualAddressableBits() const {
   const uint32_t idx = ePropertyVirtualAddressableBits;
-  return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_process_properties[idx].default_uint_value);
 }
 
 void ProcessProperties::SetVirtualAddressableBits(uint32_t bits) {
   const uint32_t idx = ePropertyVirtualAddressableBits;
-  m_collection_sp->SetPropertyAtIndexAsUInt64(nullptr, idx, bits);
+  m_collection_sp->SetPropertyAtIndexAsUInt64(idx, bits);
 }
 void ProcessProperties::SetPythonOSPluginPath(const FileSpec &file) {
   const uint32_t idx = ePropertyPythonOSPluginPath;
-  m_collection_sp->SetPropertyAtIndexAsFileSpec(nullptr, idx, file);
+  m_collection_sp->SetPropertyAtIndexAsFileSpec(idx, file);
 }
 
 bool ProcessProperties::GetIgnoreBreakpointsInExpressions() const {
   const uint32_t idx = ePropertyIgnoreBreakpointsInExpressions;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_process_properties[idx].default_uint_value != 0);
 }
 
 void ProcessProperties::SetIgnoreBreakpointsInExpressions(bool ignore) {
   const uint32_t idx = ePropertyIgnoreBreakpointsInExpressions;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, ignore);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, ignore);
 }
 
 bool ProcessProperties::GetUnwindOnErrorInExpressions() const {
   const uint32_t idx = ePropertyUnwindOnErrorInExpressions;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_process_properties[idx].default_uint_value != 0);
 }
 
 void ProcessProperties::SetUnwindOnErrorInExpressions(bool ignore) {
   const uint32_t idx = ePropertyUnwindOnErrorInExpressions;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, ignore);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, ignore);
 }
 
 bool ProcessProperties::GetStopOnSharedLibraryEvents() const {
   const uint32_t idx = ePropertyStopOnSharedLibraryEvents;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_process_properties[idx].default_uint_value != 0);
 }
 
 void ProcessProperties::SetStopOnSharedLibraryEvents(bool stop) {
   const uint32_t idx = ePropertyStopOnSharedLibraryEvents;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, stop);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, stop);
 }
 
 bool ProcessProperties::GetDisableLangRuntimeUnwindPlans() const {
   const uint32_t idx = ePropertyDisableLangRuntimeUnwindPlans;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_process_properties[idx].default_uint_value != 0);
 }
 
 void ProcessProperties::SetDisableLangRuntimeUnwindPlans(bool disable) {
   const uint32_t idx = ePropertyDisableLangRuntimeUnwindPlans;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, disable);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, disable);
   m_process->Flush();
 }
 
 bool ProcessProperties::GetDetachKeepsStopped() const {
   const uint32_t idx = ePropertyDetachKeepsStopped;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_process_properties[idx].default_uint_value != 0);
 }
 
 void ProcessProperties::SetDetachKeepsStopped(bool stop) {
   const uint32_t idx = ePropertyDetachKeepsStopped;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, stop);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, stop);
 }
 
 bool ProcessProperties::GetWarningsOptimization() const {
   const uint32_t idx = ePropertyWarningOptimization;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_process_properties[idx].default_uint_value != 0);
 }
 
 bool ProcessProperties::GetWarningsUnsupportedLanguage() const {
   const uint32_t idx = ePropertyWarningUnsupportedLanguage;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_process_properties[idx].default_uint_value != 0);
 }
 
 bool ProcessProperties::GetStopOnExec() const {
   const uint32_t idx = ePropertyStopOnExec;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_process_properties[idx].default_uint_value != 0);
 }
 
 std::chrono::seconds ProcessProperties::GetUtilityExpressionTimeout() const {
   const uint32_t idx = ePropertyUtilityExpressionTimeout;
-  uint64_t value = m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-                       .value_or(g_process_properties[idx].default_uint_value);
+  uint64_t value = m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_process_properties[idx].default_uint_value);
   return std::chrono::seconds(value);
 }
 
 std::chrono::seconds ProcessProperties::GetInterruptTimeout() const {
   const uint32_t idx = ePropertyInterruptTimeout;
-  uint64_t value = m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-                       .value_or(g_process_properties[idx].default_uint_value);
+  uint64_t value = m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_process_properties[idx].default_uint_value);
   return std::chrono::seconds(value);
 }
 
 bool ProcessProperties::GetSteppingRunsAllThreads() const {
   const uint32_t idx = ePropertySteppingRunsAllThreads;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_process_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_process_properties[idx].default_uint_value != 0);
 }
 
 bool ProcessProperties::GetOSPluginReportsAllThreads() const {
   const bool fail_value = true;
   const Property *exp_property =
-      m_collection_sp->GetPropertyAtIndex(nullptr, ePropertyExperimental);
+      m_collection_sp->GetPropertyAtIndex(ePropertyExperimental);
   OptionValueProperties *exp_values =
       exp_property->GetValue()->GetAsProperties();
   if (!exp_values)
     return fail_value;
 
   return exp_values
-      ->GetPropertyAtIndexAsBoolean(nullptr, ePropertyOSPluginReportsAllThreads)
+      ->GetPropertyAtIndexAsBoolean(ePropertyOSPluginReportsAllThreads)
       .value_or(fail_value);
 }
 
 void ProcessProperties::SetOSPluginReportsAllThreads(bool does_report) {
   const Property *exp_property =
-      m_collection_sp->GetPropertyAtIndex(nullptr, ePropertyExperimental);
+      m_collection_sp->GetPropertyAtIndex(ePropertyExperimental);
   OptionValueProperties *exp_values =
       exp_property->GetValue()->GetAsProperties();
   if (exp_values)
-    exp_values->SetPropertyAtIndexAsBoolean(
-        nullptr, ePropertyOSPluginReportsAllThreads, does_report);
+    exp_values->SetPropertyAtIndexAsBoolean(ePropertyOSPluginReportsAllThreads,
+                                            does_report);
 }
 
 FollowForkMode ProcessProperties::GetFollowForkMode() const {
   const uint32_t idx = ePropertyFollowForkMode;
-  return (FollowForkMode)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+  return (FollowForkMode)m_collection_sp->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_process_properties[idx].default_uint_value);
 }
 
@@ -480,7 +480,7 @@ Process::Process(lldb::TargetSP target_sp, ListenerSP listener_sp,
 
   // Allow the platform to override the default cache line size
   OptionValueSP value_sp =
-      m_collection_sp->GetPropertyAtIndex(nullptr, ePropertyMemCacheLineSize)
+      m_collection_sp->GetPropertyAtIndex(ePropertyMemCacheLineSize)
           ->GetValue();
   uint32_t platform_cache_line_size =
       target_sp->GetPlatform()->GetDefaultMemoryCacheLineSize();
index e2b1ea42f53f42caa2e214063bcb3938f9f9a878..033224c41ed2c3c1b3f94d3fbbe6361fdce6877f 100644 (file)
@@ -4007,8 +4007,9 @@ class TargetOptionValueProperties
 public:
   TargetOptionValueProperties(ConstString name) : Cloneable(name) {}
 
-  const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx,
-                                     uint32_t idx) const override {
+  const Property *
+  GetPropertyAtIndex(uint32_t idx,
+                     const ExecutionContext *exe_ctx = nullptr) const override {
     // When getting the value for a key from the target options, we will always
     // try and grab the setting from the current target if there is one. Else
     // we just use the one from this instance.
@@ -4130,12 +4131,12 @@ void TargetProperties::UpdateLaunchInfoFromProperties() {
 bool TargetProperties::GetInjectLocalVariables(
     ExecutionContext *exe_ctx) const {
   const Property *exp_property =
-      m_collection_sp->GetPropertyAtIndex(exe_ctx, ePropertyExperimental);
+      m_collection_sp->GetPropertyAtIndex(ePropertyExperimental, exe_ctx);
   OptionValueProperties *exp_values =
       exp_property->GetValue()->GetAsProperties();
   if (exp_values)
     return exp_values
-        ->GetPropertyAtIndexAsBoolean(exe_ctx, ePropertyInjectLocalVars)
+        ->GetPropertyAtIndexAsBoolean(ePropertyInjectLocalVars, exe_ctx)
         .value_or(true);
   else
     return true;
@@ -4144,17 +4145,17 @@ bool TargetProperties::GetInjectLocalVariables(
 void TargetProperties::SetInjectLocalVariables(ExecutionContext *exe_ctx,
                                                bool b) {
   const Property *exp_property =
-      m_collection_sp->GetPropertyAtIndex(exe_ctx, ePropertyExperimental);
+      m_collection_sp->GetPropertyAtIndex(ePropertyExperimental, exe_ctx);
   OptionValueProperties *exp_values =
       exp_property->GetValue()->GetAsProperties();
   if (exp_values)
-    exp_values->SetPropertyAtIndexAsBoolean(exe_ctx, ePropertyInjectLocalVars,
-                                            true);
+    exp_values->SetPropertyAtIndexAsBoolean(ePropertyInjectLocalVars, true,
+                                            exe_ctx);
 }
 
 ArchSpec TargetProperties::GetDefaultArchitecture() const {
   OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch(
-      nullptr, ePropertyDefaultArch);
+      ePropertyDefaultArch);
   if (value)
     return value->GetCurrentValue();
   return ArchSpec();
@@ -4162,82 +4163,82 @@ ArchSpec TargetProperties::GetDefaultArchitecture() const {
 
 void TargetProperties::SetDefaultArchitecture(const ArchSpec &arch) {
   OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch(
-      nullptr, ePropertyDefaultArch);
+      ePropertyDefaultArch);
   if (value)
     return value->SetCurrentValue(arch, true);
 }
 
 bool TargetProperties::GetMoveToNearestCode() const {
   const uint32_t idx = ePropertyMoveToNearestCode;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 lldb::DynamicValueType TargetProperties::GetPreferDynamicValue() const {
   const uint32_t idx = ePropertyPreferDynamic;
   return (lldb::DynamicValueType)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+      ->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_target_properties[idx].default_uint_value);
 }
 
 bool TargetProperties::SetPreferDynamicValue(lldb::DynamicValueType d) {
   const uint32_t idx = ePropertyPreferDynamic;
-  return m_collection_sp->SetPropertyAtIndexAsEnumeration(nullptr, idx, d);
+  return m_collection_sp->SetPropertyAtIndexAsEnumeration(idx, d);
 }
 
 bool TargetProperties::GetPreloadSymbols() const {
   const uint32_t idx = ePropertyPreloadSymbols;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetPreloadSymbols(bool b) {
   const uint32_t idx = ePropertyPreloadSymbols;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
 }
 
 bool TargetProperties::GetDisableASLR() const {
   const uint32_t idx = ePropertyDisableASLR;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetDisableASLR(bool b) {
   const uint32_t idx = ePropertyDisableASLR;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
 }
 
 bool TargetProperties::GetInheritTCC() const {
   const uint32_t idx = ePropertyInheritTCC;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetInheritTCC(bool b) {
   const uint32_t idx = ePropertyInheritTCC;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
 }
 
 bool TargetProperties::GetDetachOnError() const {
   const uint32_t idx = ePropertyDetachOnError;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetDetachOnError(bool b) {
   const uint32_t idx = ePropertyDetachOnError;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
 }
 
 bool TargetProperties::GetDisableSTDIO() const {
   const uint32_t idx = ePropertyDisableSTDIO;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetDisableSTDIO(bool b) {
   const uint32_t idx = ePropertyDisableSTDIO;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
 }
 
 const char *TargetProperties::GetDisassemblyFlavor() const {
@@ -4246,7 +4247,7 @@ const char *TargetProperties::GetDisassemblyFlavor() const {
 
   x86DisassemblyFlavor flavor_value =
       (x86DisassemblyFlavor)m_collection_sp
-          ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+          ->GetPropertyAtIndexAsEnumeration(idx)
           .value_or(g_target_properties[idx].default_uint_value);
   return_value = g_x86_dis_flavor_value_types[flavor_value].string_value;
   return return_value;
@@ -4254,31 +4255,30 @@ const char *TargetProperties::GetDisassemblyFlavor() const {
 
 InlineStrategy TargetProperties::GetInlineStrategy() const {
   const uint32_t idx = ePropertyInlineStrategy;
-  return (InlineStrategy)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+  return (InlineStrategy)m_collection_sp->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_target_properties[idx].default_uint_value);
 }
 
 llvm::StringRef TargetProperties::GetArg0() const {
   const uint32_t idx = ePropertyArg0;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
-      .value_or(g_target_properties[idx].default_cstr_value);
+  return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+      g_target_properties[idx].default_cstr_value);
 }
 
 void TargetProperties::SetArg0(llvm::StringRef arg) {
   const uint32_t idx = ePropertyArg0;
-  m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, arg);
+  m_collection_sp->SetPropertyAtIndexAsString(idx, arg);
   m_launch_info.SetArg0(arg);
 }
 
 bool TargetProperties::GetRunArguments(Args &args) const {
   const uint32_t idx = ePropertyRunArgs;
-  return m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, idx, args);
+  return m_collection_sp->GetPropertyAtIndexAsArgs(idx, args);
 }
 
 void TargetProperties::SetRunArguments(const Args &args) {
   const uint32_t idx = ePropertyRunArgs;
-  m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, args);
+  m_collection_sp->SetPropertyAtIndexFromArgs(idx, args);
   m_launch_info.GetArguments() = args;
 }
 
@@ -4286,7 +4286,7 @@ Environment TargetProperties::ComputeEnvironment() const {
   Environment env;
 
   if (m_target &&
-      m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, ePropertyInheritEnv)
+      m_collection_sp->GetPropertyAtIndexAsBoolean(ePropertyInheritEnv)
           .value_or(
               g_target_properties[ePropertyInheritEnv].default_uint_value !=
               0)) {
@@ -4298,14 +4298,13 @@ Environment TargetProperties::ComputeEnvironment() const {
   }
 
   Args property_unset_env;
-  m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyUnsetEnvVars,
+  m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyUnsetEnvVars,
                                             property_unset_env);
   for (const auto &var : property_unset_env)
     env.erase(var.ref());
 
   Args property_env;
-  m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyEnvVars,
-                                            property_env);
+  m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyEnvVars, property_env);
   for (const auto &KV : Environment(property_env))
     env[KV.first()] = KV.second;
 
@@ -4322,8 +4321,7 @@ Environment TargetProperties::GetInheritedEnvironment() const {
   if (m_target == nullptr)
     return environment;
 
-  if (!m_collection_sp
-           ->GetPropertyAtIndexAsBoolean(nullptr, ePropertyInheritEnv)
+  if (!m_collection_sp->GetPropertyAtIndexAsBoolean(ePropertyInheritEnv)
            .value_or(
                g_target_properties[ePropertyInheritEnv].default_uint_value !=
                0))
@@ -4338,7 +4336,7 @@ Environment TargetProperties::GetInheritedEnvironment() const {
     environment[KV.first()] = KV.second;
 
   Args property_unset_environment;
-  m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyUnsetEnvVars,
+  m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyUnsetEnvVars,
                                             property_unset_environment);
   for (const auto &var : property_unset_environment)
     environment.erase(var.ref());
@@ -4348,7 +4346,7 @@ Environment TargetProperties::GetInheritedEnvironment() const {
 
 Environment TargetProperties::GetTargetEnvironment() const {
   Args property_environment;
-  m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyEnvVars,
+  m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyEnvVars,
                                             property_environment);
   Environment environment;
   for (const auto &KV : Environment(property_environment))
@@ -4360,35 +4358,33 @@ Environment TargetProperties::GetTargetEnvironment() const {
 void TargetProperties::SetEnvironment(Environment env) {
   // TODO: Get rid of the Args intermediate step
   const uint32_t idx = ePropertyEnvVars;
-  m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, Args(env));
+  m_collection_sp->SetPropertyAtIndexFromArgs(idx, Args(env));
 }
 
 bool TargetProperties::GetSkipPrologue() const {
   const uint32_t idx = ePropertySkipPrologue;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 PathMappingList &TargetProperties::GetSourcePathMap() const {
   const uint32_t idx = ePropertySourceMap;
   OptionValuePathMappings *option_value =
-      m_collection_sp->GetPropertyAtIndexAsOptionValuePathMappings(nullptr,
-                                                                   idx);
+      m_collection_sp->GetPropertyAtIndexAsOptionValuePathMappings(idx);
   assert(option_value);
   return option_value->GetCurrentValue();
 }
 
 bool TargetProperties::GetAutoSourceMapRelative() const {
   const uint32_t idx = ePropertyAutoSourceMapRelative;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::AppendExecutableSearchPaths(const FileSpec &dir) {
   const uint32_t idx = ePropertyExecutableSearchPaths;
   OptionValueFileSpecList *option_value =
-      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
-                                                                   idx);
+      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
   assert(option_value);
   option_value->AppendCurrentValue(dir);
 }
@@ -4396,8 +4392,7 @@ void TargetProperties::AppendExecutableSearchPaths(const FileSpec &dir) {
 FileSpecList TargetProperties::GetExecutableSearchPaths() {
   const uint32_t idx = ePropertyExecutableSearchPaths;
   const OptionValueFileSpecList *option_value =
-      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
-                                                                   idx);
+      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
   assert(option_value);
   return option_value->GetCurrentValue();
 }
@@ -4405,8 +4400,7 @@ FileSpecList TargetProperties::GetExecutableSearchPaths() {
 FileSpecList TargetProperties::GetDebugFileSearchPaths() {
   const uint32_t idx = ePropertyDebugFileSearchPaths;
   const OptionValueFileSpecList *option_value =
-      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
-                                                                   idx);
+      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
   assert(option_value);
   return option_value->GetCurrentValue();
 }
@@ -4414,53 +4408,51 @@ FileSpecList TargetProperties::GetDebugFileSearchPaths() {
 FileSpecList TargetProperties::GetClangModuleSearchPaths() {
   const uint32_t idx = ePropertyClangModuleSearchPaths;
   const OptionValueFileSpecList *option_value =
-      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
-                                                                   idx);
+      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
   assert(option_value);
   return option_value->GetCurrentValue();
 }
 
 bool TargetProperties::GetEnableAutoImportClangModules() const {
   const uint32_t idx = ePropertyAutoImportClangModules;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 ImportStdModule TargetProperties::GetImportStdModule() const {
   const uint32_t idx = ePropertyImportStdModule;
-  return (ImportStdModule)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+  return (ImportStdModule)m_collection_sp->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_target_properties[idx].default_uint_value);
 }
 
 DynamicClassInfoHelper TargetProperties::GetDynamicClassInfoHelper() const {
   const uint32_t idx = ePropertyDynamicClassInfoHelper;
   return (DynamicClassInfoHelper)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+      ->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_target_properties[idx].default_uint_value);
 }
 
 bool TargetProperties::GetEnableAutoApplyFixIts() const {
   const uint32_t idx = ePropertyAutoApplyFixIts;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 uint64_t TargetProperties::GetNumberOfRetriesWithFixits() const {
   const uint32_t idx = ePropertyRetriesWithFixIts;
-  return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_target_properties[idx].default_uint_value);
 }
 
 bool TargetProperties::GetEnableNotifyAboutFixIts() const {
   const uint32_t idx = ePropertyNotifyAboutFixIts;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 FileSpec TargetProperties::GetSaveJITObjectsDir() const {
   const uint32_t idx = ePropertySaveObjectsDir;
-  return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
 }
 
 void TargetProperties::CheckJITObjectsDir() {
@@ -4476,7 +4468,7 @@ void TargetProperties::CheckJITObjectsDir() {
   if (exists && is_directory && writable)
     return;
 
-  m_collection_sp->GetPropertyAtIndex(nullptr, ePropertySaveObjectsDir)
+  m_collection_sp->GetPropertyAtIndex(ePropertySaveObjectsDir)
       ->GetValue()
       ->Clear();
 
@@ -4498,77 +4490,77 @@ void TargetProperties::CheckJITObjectsDir() {
 
 bool TargetProperties::GetEnableSyntheticValue() const {
   const uint32_t idx = ePropertyEnableSynthetic;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 uint32_t TargetProperties::GetMaxZeroPaddingInFloatFormat() const {
   const uint32_t idx = ePropertyMaxZeroPaddingInFloatFormat;
-  return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_target_properties[idx].default_uint_value);
 }
 
 uint32_t TargetProperties::GetMaximumNumberOfChildrenToDisplay() const {
   const uint32_t idx = ePropertyMaxChildrenCount;
-  return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+      g_target_properties[idx].default_uint_value);
 }
 
 std::pair<uint32_t, bool>
 TargetProperties::GetMaximumDepthOfChildrenToDisplay() const {
   const uint32_t idx = ePropertyMaxChildrenDepth;
   auto *option_value =
-      m_collection_sp->GetPropertyAtIndexAsOptionValueUInt64(nullptr, idx);
+      m_collection_sp->GetPropertyAtIndexAsOptionValueUInt64(idx);
   bool is_default = !option_value->OptionWasSet();
   return {option_value->GetCurrentValue(), is_default};
 }
 
 uint32_t TargetProperties::GetMaximumSizeOfStringSummary() const {
   const uint32_t idx = ePropertyMaxSummaryLength;
-  return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+      g_target_properties[idx].default_uint_value);
 }
 
 uint32_t TargetProperties::GetMaximumMemReadSize() const {
   const uint32_t idx = ePropertyMaxMemReadSize;
-  return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+      g_target_properties[idx].default_uint_value);
 }
 
 FileSpec TargetProperties::GetStandardInputPath() const {
   const uint32_t idx = ePropertyInputPath;
-  return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
 }
 
 void TargetProperties::SetStandardInputPath(llvm::StringRef path) {
   const uint32_t idx = ePropertyInputPath;
-  m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path);
+  m_collection_sp->SetPropertyAtIndexAsString(idx, path);
 }
 
 FileSpec TargetProperties::GetStandardOutputPath() const {
   const uint32_t idx = ePropertyOutputPath;
-  return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
 }
 
 void TargetProperties::SetStandardOutputPath(llvm::StringRef path) {
   const uint32_t idx = ePropertyOutputPath;
-  m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path);
+  m_collection_sp->SetPropertyAtIndexAsString(idx, path);
 }
 
 FileSpec TargetProperties::GetStandardErrorPath() const {
   const uint32_t idx = ePropertyErrorPath;
-  return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
 }
 
 void TargetProperties::SetStandardErrorPath(llvm::StringRef path) {
   const uint32_t idx = ePropertyErrorPath;
-  m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path);
+  m_collection_sp->SetPropertyAtIndexAsString(idx, path);
 }
 
 LanguageType TargetProperties::GetLanguage() const {
   OptionValueLanguage *value =
       m_collection_sp->GetPropertyAtIndexAsOptionValueLanguage(
-          nullptr, ePropertyLanguage);
+          ePropertyLanguage);
   if (value)
     return value->GetCurrentValue();
   return LanguageType();
@@ -4577,7 +4569,7 @@ LanguageType TargetProperties::GetLanguage() const {
 llvm::StringRef TargetProperties::GetExpressionPrefixContents() {
   const uint32_t idx = ePropertyExprPrefix;
   OptionValueFileSpec *file =
-      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpec(nullptr, idx);
+      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpec(idx);
   if (file) {
     DataBufferSP data_sp(file->GetFileContents());
     if (data_sp)
@@ -4590,92 +4582,92 @@ llvm::StringRef TargetProperties::GetExpressionPrefixContents() {
 
 uint64_t TargetProperties::GetExprErrorLimit() const {
   const uint32_t idx = ePropertyExprErrorLimit;
-  return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value);
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_target_properties[idx].default_uint_value);
 }
 
 bool TargetProperties::GetBreakpointsConsultPlatformAvoidList() {
   const uint32_t idx = ePropertyBreakpointUseAvoidList;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 bool TargetProperties::GetUseHexImmediates() const {
   const uint32_t idx = ePropertyUseHexImmediates;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 bool TargetProperties::GetUseFastStepping() const {
   const uint32_t idx = ePropertyUseFastStepping;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 bool TargetProperties::GetDisplayExpressionsInCrashlogs() const {
   const uint32_t idx = ePropertyDisplayExpressionsInCrashlogs;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 LoadScriptFromSymFile TargetProperties::GetLoadScriptFromSymbolFile() const {
   const uint32_t idx = ePropertyLoadScriptFromSymbolFile;
   return (LoadScriptFromSymFile)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+      ->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_target_properties[idx].default_uint_value);
 }
 
 LoadCWDlldbinitFile TargetProperties::GetLoadCWDlldbinitFile() const {
   const uint32_t idx = ePropertyLoadCWDlldbinitFile;
   return (LoadCWDlldbinitFile)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+      ->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_target_properties[idx].default_uint_value);
 }
 
 Disassembler::HexImmediateStyle TargetProperties::GetHexImmediateStyle() const {
   const uint32_t idx = ePropertyHexImmediateStyle;
   return (Disassembler::HexImmediateStyle)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+      ->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_target_properties[idx].default_uint_value);
 }
 
 MemoryModuleLoadLevel TargetProperties::GetMemoryModuleLoadLevel() const {
   const uint32_t idx = ePropertyMemoryModuleLoadLevel;
   return (MemoryModuleLoadLevel)m_collection_sp
-      ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+      ->GetPropertyAtIndexAsEnumeration(idx)
       .value_or(g_target_properties[idx].default_uint_value);
 }
 
 bool TargetProperties::GetUserSpecifiedTrapHandlerNames(Args &args) const {
   const uint32_t idx = ePropertyTrapHandlerNames;
-  return m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, idx, args);
+  return m_collection_sp->GetPropertyAtIndexAsArgs(idx, args);
 }
 
 void TargetProperties::SetUserSpecifiedTrapHandlerNames(const Args &args) {
   const uint32_t idx = ePropertyTrapHandlerNames;
-  m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, args);
+  m_collection_sp->SetPropertyAtIndexFromArgs(idx, args);
 }
 
 bool TargetProperties::GetDisplayRuntimeSupportValues() const {
   const uint32_t idx = ePropertyDisplayRuntimeSupportValues;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetDisplayRuntimeSupportValues(bool b) {
   const uint32_t idx = ePropertyDisplayRuntimeSupportValues;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
 }
 
 bool TargetProperties::GetDisplayRecognizedArguments() const {
   const uint32_t idx = ePropertyDisplayRecognizedArguments;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetDisplayRecognizedArguments(bool b) {
   const uint32_t idx = ePropertyDisplayRecognizedArguments;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
 }
 
 const ProcessLaunchInfo &TargetProperties::GetProcessLaunchInfo() const {
@@ -4712,19 +4704,19 @@ void TargetProperties::SetProcessLaunchInfo(
 
 bool TargetProperties::GetRequireHardwareBreakpoints() const {
   const uint32_t idx = ePropertyRequireHardwareBreakpoints;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetRequireHardwareBreakpoints(bool b) {
   const uint32_t idx = ePropertyRequireHardwareBreakpoints;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
 }
 
 bool TargetProperties::GetAutoInstallMainExecutable() const {
   const uint32_t idx = ePropertyAutoInstallMainExecutable;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::Arg0ValueChangedCallback() {
@@ -4786,13 +4778,13 @@ void TargetProperties::DisableSTDIOValueChangedCallback() {
 
 bool TargetProperties::GetDebugUtilityExpression() const {
   const uint32_t idx = ePropertyDebugUtilityExpression;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_target_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetDebugUtilityExpression(bool debug) {
   const uint32_t idx = ePropertyDebugUtilityExpression;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, debug);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(idx, debug);
 }
 
 // Target::TargetEventData
index ccb45eed82fb103de1b1e05f15b0ba7e239f0909..2b3e8ba5ae079aec3d1273cd78e340ef5f70d2e5 100644 (file)
@@ -78,8 +78,9 @@ class ThreadOptionValueProperties
 public:
   ThreadOptionValueProperties(ConstString name) : Cloneable(name) {}
 
-  const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx,
-                                     uint32_t idx) const override {
+  const Property *
+  GetPropertyAtIndex(uint32_t idx,
+                     const ExecutionContext *exe_ctx) const override {
     // When getting the value for a key from the thread options, we will always
     // try and grab the setting from the current thread if there is one. Else
     // we just use the one from this instance.
@@ -111,40 +112,39 @@ ThreadProperties::~ThreadProperties() = default;
 
 const RegularExpression *ThreadProperties::GetSymbolsToAvoidRegexp() {
   const uint32_t idx = ePropertyStepAvoidRegex;
-  return m_collection_sp->GetPropertyAtIndexAsOptionValueRegex(nullptr, idx);
+  return m_collection_sp->GetPropertyAtIndexAsOptionValueRegex(idx);
 }
 
 FileSpecList ThreadProperties::GetLibrariesToAvoid() const {
   const uint32_t idx = ePropertyStepAvoidLibraries;
   const OptionValueFileSpecList *option_value =
-      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
-                                                                   idx);
+      m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
   assert(option_value);
   return option_value->GetCurrentValue();
 }
 
 bool ThreadProperties::GetTraceEnabledState() const {
   const uint32_t idx = ePropertyEnableThreadTrace;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_thread_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_thread_properties[idx].default_uint_value != 0);
 }
 
 bool ThreadProperties::GetStepInAvoidsNoDebug() const {
   const uint32_t idx = ePropertyStepInAvoidsNoDebug;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_thread_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_thread_properties[idx].default_uint_value != 0);
 }
 
 bool ThreadProperties::GetStepOutAvoidsNoDebug() const {
   const uint32_t idx = ePropertyStepOutAvoidsNoDebug;
-  return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
-      .value_or(g_thread_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+      g_thread_properties[idx].default_uint_value != 0);
 }
 
 uint64_t ThreadProperties::GetMaxBacktraceDepth() const {
   const uint32_t idx = ePropertyMaxBacktraceDepth;
-  return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
-      .value_or(g_thread_properties[idx].default_uint_value != 0);
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+      g_thread_properties[idx].default_uint_value != 0);
 }
 
 // Thread Event Data
@@ -713,7 +713,7 @@ bool Thread::ShouldResume(StateType resume_state) {
   return need_to_resume;
 }
 
-void Thread::DidResume() { 
+void Thread::DidResume() {
   SetResumeSignal(LLDB_INVALID_SIGNAL_NUMBER);
   // This will get recomputed each time when we stop.
   SetShouldRunBeforePublicStop(false);
@@ -757,7 +757,7 @@ bool Thread::ShouldStop(Event *event_ptr) {
                                    : LLDB_INVALID_ADDRESS);
     return false;
   }
-  
+
   // Clear the "must run me before stop" if it was set:
   SetShouldRunBeforePublicStop(false);
 
@@ -987,7 +987,7 @@ Vote Thread::ShouldReportStop(Event *event_ptr) {
   }
 
   if (GetPlans().AnyCompletedPlans()) {
-    // Pass skip_private = false to GetCompletedPlan, since we want to ask 
+    // Pass skip_private = false to GetCompletedPlan, since we want to ask
     // the last plan, regardless of whether it is private or not.
     LLDB_LOGF(log,
               "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
@@ -1025,7 +1025,7 @@ Vote Thread::ShouldReportRun(Event *event_ptr) {
 
   Log *log = GetLog(LLDBLog::Step);
   if (GetPlans().AnyCompletedPlans()) {
-    // Pass skip_private = false to GetCompletedPlan, since we want to ask 
+    // Pass skip_private = false to GetCompletedPlan, since we want to ask
     // the last plan, regardless of whether it is private or not.
     LLDB_LOGF(log,
               "Current Plan for thread %d(%p) (0x%4.4" PRIx64
@@ -1078,7 +1078,7 @@ void Thread::PushPlan(ThreadPlanSP thread_plan_sp) {
               static_cast<void *>(this), s.GetData(),
               thread_plan_sp->GetThread().GetID());
   }
-  
+
   GetPlans().PushPlan(std::move(thread_plan_sp));
 }
 
@@ -1096,7 +1096,7 @@ void Thread::DiscardPlan() {
   ThreadPlanSP discarded_plan_sp = GetPlans().DiscardPlan();
 
   LLDB_LOGF(log, "Discarding plan: \"%s\", tid = 0x%4.4" PRIx64 ".",
-            discarded_plan_sp->GetName(), 
+            discarded_plan_sp->GetName(),
             discarded_plan_sp->GetThread().GetID());
 }
 
@@ -1225,7 +1225,7 @@ Status Thread::UnwindInnermostExpression() {
   if (!innermost_expr_plan) {
     error.SetErrorString("No expressions currently active on this thread");
     return error;
-  }  
+  }
   DiscardThreadPlansUpToPlan(innermost_expr_plan);
   return error;
 }
@@ -1369,8 +1369,8 @@ ThreadPlanSP Thread::QueueThreadPlanForStepUntil(
 }
 
 lldb::ThreadPlanSP Thread::QueueThreadPlanForStepScripted(
-    bool abort_other_plans, const char *class_name, 
-    StructuredData::ObjectSP extra_args_sp,  bool stop_other_threads,
+    bool abort_other_plans, const char *class_name,
+    StructuredData::ObjectSP extra_args_sp, bool stop_other_threads,
     Status &status) {
 
   ThreadPlanSP thread_plan_sp(new ThreadPlanPython(
index 30687d6a6ede6e02addbf4179ae7635d0c6101d8..64adcff243fd9a123f920d5738ea53e1bb416032 100644 (file)
@@ -16,6 +16,7 @@ class Callback {
 public:
   virtual void Invoke() const {}
   void operator()() const { Invoke(); }
+
 protected:
   ~Callback() = default;
 };
@@ -101,12 +102,11 @@ public:
   }
 
   OptionValueDictionary *GetDictionary() {
-    return GetPropertyAtIndexAsOptionValueDictionary(nullptr, m_dict_index);
+    return GetPropertyAtIndexAsOptionValueDictionary(m_dict_index);
   }
 
   OptionValueFileSpecList *GetFileList() {
-    return GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
-                                                       m_file_list_index);
+    return GetPropertyAtIndexAsOptionValueFileSpecList(m_file_list_index);
   }
 
 private:
@@ -170,5 +170,6 @@ TEST(TestProperties, DeepCopy) {
   dict_copy_ptr->SetValueFromString("C=3", eVarSetOperationAppend);
 
   // Trigger the callback second time.
-  file_list_copy_ptr->SetValueFromString("0 another/path", eVarSetOperationReplace);
+  file_list_copy_ptr->SetValueFromString("0 another/path",
+                                         eVarSetOperationReplace);
 }