[all-commits] [llvm/llvm-project] 9c48aa: [lldb] Refactor OptionValueProperties to return a ...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Mon May 1 21:46:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9c48aa68f455a63fc5e20e196d3c3e8822bfa6af
      https://github.com/llvm/llvm-project/commit/9c48aa68f455a63fc5e20e196d3c3e8822bfa6af
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2023-05-01 (Mon, 01 May 2023)

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

  Log Message:
  -----------
  [lldb] Refactor OptionValueProperties to return a std::optional (NFC)

Similar to fdbe7c7faa54, refactor OptionValueProperties to return a
std::optional instead of taking a fail value. This allows the caller to
handle situations where there's no value, instead of being unable to
distinguish between the absence of a value and the value happening the
match the fail value. When a fail value is required,
std::optional::value_or() provides the same functionality.




More information about the All-commits mailing list