File indexing completed on 2026-05-10 08:42:50
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_INTERPRETER_OPTIONVALUEFILESPECLIST_H
0010 #define LLDB_INTERPRETER_OPTIONVALUEFILESPECLIST_H
0011
0012 #include <mutex>
0013
0014 #include "lldb/Interpreter/OptionValue.h"
0015 #include "lldb/Utility/FileSpecList.h"
0016
0017 namespace lldb_private {
0018
0019 class OptionValueFileSpecList
0020 : public Cloneable<OptionValueFileSpecList, OptionValue> {
0021 public:
0022 OptionValueFileSpecList() = default;
0023
0024 OptionValueFileSpecList(const OptionValueFileSpecList &other)
0025 : Cloneable(other), m_current_value(other.GetCurrentValue()) {}
0026
0027 ~OptionValueFileSpecList() override = default;
0028
0029
0030
0031 OptionValue::Type GetType() const override { return eTypeFileSpecList; }
0032
0033 void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
0034 uint32_t dump_mask) override;
0035
0036 Status
0037 SetValueFromString(llvm::StringRef value,
0038 VarSetOperationType op = eVarSetOperationAssign) override;
0039
0040 void Clear() override {
0041 std::lock_guard<std::recursive_mutex> lock(m_mutex);
0042 m_current_value.Clear();
0043 m_value_was_set = false;
0044 }
0045
0046 bool IsAggregateValue() const override { return true; }
0047
0048
0049
0050 FileSpecList GetCurrentValue() const {
0051 std::lock_guard<std::recursive_mutex> lock(m_mutex);
0052 return m_current_value;
0053 }
0054
0055 void SetCurrentValue(const FileSpecList &value) {
0056 std::lock_guard<std::recursive_mutex> lock(m_mutex);
0057 m_current_value = value;
0058 }
0059
0060 void AppendCurrentValue(const FileSpec &value) {
0061 std::lock_guard<std::recursive_mutex> lock(m_mutex);
0062 m_current_value.Append(value);
0063 }
0064
0065 protected:
0066 lldb::OptionValueSP Clone() const override;
0067
0068 mutable std::recursive_mutex m_mutex;
0069 FileSpecList m_current_value;
0070 };
0071
0072 }
0073
0074 #endif