[all-commits] [llvm/llvm-project] 6f8b33: [lldb] Use templates to simplify {Get, Set}Property...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu May 4 16:43:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f8b33f6dfd0a0f8d2522b6c832bd6298ae2f3f3
      https://github.com/llvm/llvm-project/commit/6f8b33f6dfd0a0f8d2522b6c832bd6298ae2f3f3
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2023-05-04 (Thu, 04 May 2023)

  Changed paths:
    M lldb/include/lldb/Core/Debugger.h
    M lldb/include/lldb/Core/UserSettingsController.h
    M lldb/include/lldb/Interpreter/OptionValue.h
    M lldb/include/lldb/Interpreter/OptionValueProperties.h
    M lldb/source/Core/CoreProperties.td
    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/Interpreter/Property.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] Use templates to simplify {Get,Set}PropertyAtIndex (NFC)

Use templates to simplify {Get,Set}PropertyAtIndex. It has always
bothered me how cumbersome those calls are when adding new properties.
After this patch, SetPropertyAtIndex infers the type from its arguments
and GetPropertyAtIndex required a single template argument for the
return value. As an added benefit, this enables us to remove a bunch of
wrappers from UserSettingsController and OptionValueProperties.

Differential revision: https://reviews.llvm.org/D149774




More information about the All-commits mailing list