================ @@ -0,0 +1,59 @@ +//===-- SBCoreDumpOptions.h -------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_API_SBCOREDUMPOPTIONS_H +#define LLDB_API_SBCOREDUMPOPTIONS_H + +#include "lldb/API/SBDefines.h" +#include "lldb/Symbol/CoreDumpOptions.h" + +namespace lldb { + +class LLDB_API SBCoreDumpOptions { +public: + SBCoreDumpOptions(const char *filePath); + SBCoreDumpOptions(const lldb::SBCoreDumpOptions &rhs); + ~SBCoreDumpOptions() = default; + + const SBCoreDumpOptions &operator=(const lldb::SBCoreDumpOptions &rhs); + + /// Set the Core dump plugin name. + /// + /// \param plugin Name of the object file plugin. + void SetCoreDumpPluginName(const char *plugin); + + /// Get the Core dump plugin name, if set. + /// + /// \return The name of the plugin, or nullopt if not set. + const std::optional<const char *> GetCoreDumpPluginName() const; ---------------- clayborg wrote:
Jason is right: no std::optional in the public API. The std::optional should only be used in the internal lldb_private::CoreDumpOptions and the accessors for lldb_private::CoreDumpOptions should not return std::optional either, it should use it to return something like: ``` return m_optional.value_or(<default-value>); ``` The std::optional stuff is there just so we know when a user has set an option value in a command or on via the API. If the value hasn't been set, then we return a good default value. This function should return `NULL` if there is no value. https://github.com/llvm/llvm-project/pull/98403 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits