1 //===-- OptionGroupOutputFile.h ---------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_OptionGroupOutputFile_h_
10 #define liblldb_OptionGroupOutputFile_h_
12 #include "lldb/Interpreter/OptionValueBoolean.h"
13 #include "lldb/Interpreter/OptionValueFileSpec.h"
14 #include "lldb/Interpreter/Options.h"
16 namespace lldb_private {
17 // OptionGroupOutputFile
19 class OptionGroupOutputFile : public OptionGroup {
21 OptionGroupOutputFile();
23 ~OptionGroupOutputFile() override;
25 llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
27 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
28 ExecutionContext *execution_context) override;
29 Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
31 void OptionParsingStarting(ExecutionContext *execution_context) override;
33 const OptionValueFileSpec &GetFile() { return m_file; }
35 const OptionValueBoolean &GetAppend() { return m_append; }
37 bool AnyOptionWasSet() const {
38 return m_file.OptionWasSet() || m_append.OptionWasSet();
42 OptionValueFileSpec m_file;
43 OptionValueBoolean m_append;
46 } // namespace lldb_private
48 #endif // liblldb_OptionGroupOutputFile_h_