[all-commits] [llvm/llvm-project] 4b3540: [lldb/API] Move SBCommandInterpreterRunOption in i...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Apr 30 13:43:32 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4b354039423f2a4d50cf70564faf52d8bb8a6fe3
      https://github.com/llvm/llvm-project/commit/4b354039423f2a4d50cf70564faf52d8bb8a6fe3
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M lldb/bindings/headers.swig
    M lldb/bindings/interface/SBCommandInterpreter.i
    A lldb/bindings/interface/SBCommandInterpreterRunOptions.i
    M lldb/bindings/interfaces.swig
    M lldb/include/lldb/API/SBCommandInterpreter.h
    A lldb/include/lldb/API/SBCommandInterpreterRunOptions.h
    A lldb/lldb/bindings/interface/SBCommandInterpreterRunOptions.i
    A lldb/lldb/include/lldb/API/SBCommandInterpreterRunOptions.h
    A lldb/lldb/source/API/SBCommandInterpreterRunOptions.cpp
    M lldb/source/API/CMakeLists.txt
    M lldb/source/API/SBCommandInterpreter.cpp
    A lldb/source/API/SBCommandInterpreterRunOptions.cpp
    M lldb/source/API/SBDebugger.cpp
    M lldb/source/API/SBReproducer.cpp
    M lldb/tools/driver/Driver.cpp

  Log Message:
  -----------
  [lldb/API] Move SBCommandInterpreterRunOption in its own header. (NFC)

Currently, `SBCommandInterpreterRunOptions` is defined in
`SBCommandInterpreter.h`. Given that the options are always passed by
reference, a forward declaration is sufficient.

That's not the case for `SBCommandInterpreterRunResults`, which we need
for a new overload for `RunCommandInterpreter` and that returns this new
class by value. We can't include `SBCommandInterpreter.h` because
`SBCommandInterpreter::GetDebugger()` returns SBDebugger by value and
therefore needs a full definition.

This patch moves the definition of `SBCommandInterpreterRunOptions` into
a new header. In a later patch,  `SBCommandInterpreterRunResults` will
be defined in there as well, solving the aforementioned problem.

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




More information about the All-commits mailing list