summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/NamedOptionValue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/NamedOptionValue.cpp')
-rw-r--r--lldb/source/Interpreter/NamedOptionValue.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/NamedOptionValue.cpp b/lldb/source/Interpreter/NamedOptionValue.cpp
index 7c1284f8067..6b5dd7e3c0b 100644
--- a/lldb/source/Interpreter/NamedOptionValue.cpp
+++ b/lldb/source/Interpreter/NamedOptionValue.cpp
@@ -102,6 +102,21 @@ OptionValue::GetAsDictionaryValue ()
return NULL;
}
+const char *
+OptionValue::GetStringValue ()
+{
+ if (GetType () == OptionValue::eTypeString)
+ return static_cast<OptionValueString *>(this)->GetCurrentValue();
+ return NULL;
+}
+
+uint64_t
+OptionValue::GetUInt64Value ()
+{
+ if (GetType () == OptionValue::eTypeUInt64)
+ return static_cast<OptionValueUInt64 *>(this)->GetCurrentValue();
+ return 0;
+}
//-------------------------------------------------------------------------
// OptionValueCollection
OpenPOWER on IntegriCloud