Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:50

0001 //===-- OptionGroupOutputFile.h ---------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_INTERPRETER_OPTIONGROUPOUTPUTFILE_H
0010 #define LLDB_INTERPRETER_OPTIONGROUPOUTPUTFILE_H
0011 
0012 #include "lldb/Interpreter/OptionValueBoolean.h"
0013 #include "lldb/Interpreter/OptionValueFileSpec.h"
0014 #include "lldb/Interpreter/Options.h"
0015 
0016 namespace lldb_private {
0017 // OptionGroupOutputFile
0018 
0019 class OptionGroupOutputFile : public OptionGroup {
0020 public:
0021   OptionGroupOutputFile();
0022 
0023   ~OptionGroupOutputFile() override = default;
0024 
0025   llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
0026 
0027   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
0028                         ExecutionContext *execution_context) override;
0029 
0030   void OptionParsingStarting(ExecutionContext *execution_context) override;
0031 
0032   const OptionValueFileSpec &GetFile() { return m_file; }
0033 
0034   const OptionValueBoolean &GetAppend() { return m_append; }
0035 
0036   bool AnyOptionWasSet() const {
0037     return m_file.OptionWasSet() || m_append.OptionWasSet();
0038   }
0039 
0040 protected:
0041   OptionValueFileSpec m_file;
0042   OptionValueBoolean m_append;
0043 };
0044 
0045 } // namespace lldb_private
0046 
0047 #endif // LLDB_INTERPRETER_OPTIONGROUPOUTPUTFILE_H