aboutsummaryrefslogtreecommitdiff
path: root/lldb/include/lldb/Interpreter/OptionValueRegex.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/include/lldb/Interpreter/OptionValueRegex.h')
-rw-r--r--lldb/include/lldb/Interpreter/OptionValueRegex.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/lldb/include/lldb/Interpreter/OptionValueRegex.h b/lldb/include/lldb/Interpreter/OptionValueRegex.h
index 4751a1dc27ed..129987484f19 100644
--- a/lldb/include/lldb/Interpreter/OptionValueRegex.h
+++ b/lldb/include/lldb/Interpreter/OptionValueRegex.h
@@ -14,11 +14,10 @@
namespace lldb_private {
-class OptionValueRegex : public OptionValue {
+class OptionValueRegex : public Cloneable<OptionValueRegex, OptionValue> {
public:
OptionValueRegex(const char *value = nullptr)
- : OptionValue(), m_regex(llvm::StringRef::withNullAsEmpty(value)),
- m_default_regex_str(llvm::StringRef::withNullAsEmpty(value).str()) {}
+ : m_regex(value), m_default_regex_str(value) {}
~OptionValueRegex() override = default;
@@ -32,17 +31,12 @@ public:
Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Status
- SetValueFromString(const char *,
- VarSetOperationType = eVarSetOperationAssign) = delete;
void Clear() override {
m_regex = RegularExpression(m_default_regex_str);
m_value_was_set = false;
}
- lldb::OptionValueSP DeepCopy() const override;
-
// Subclass specific functions
const RegularExpression *GetCurrentValue() const {
return (m_regex.IsValid() ? &m_regex : nullptr);