summaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/OptionValueProperties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/OptionValueProperties.cpp')
-rw-r--r--lldb/source/Interpreter/OptionValueProperties.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/OptionValueProperties.cpp b/lldb/source/Interpreter/OptionValueProperties.cpp
index 1a8f2f0ab180..6e6580574edf 100644
--- a/lldb/source/Interpreter/OptionValueProperties.cpp
+++ b/lldb/source/Interpreter/OptionValueProperties.cpp
@@ -226,6 +226,17 @@ OptionValueProperties::GetPropertyAtIndexAsOptionValueLanguage(
return nullptr;
}
+bool OptionValueProperties::SetPropertyAtIndexAsLanguage(
+ const ExecutionContext *exe_ctx, uint32_t idx, const LanguageType lang) {
+ const Property *property = GetPropertyAtIndex(exe_ctx, true, idx);
+ if (property) {
+ OptionValue *value = property->GetValue().get();
+ if (value)
+ return value->SetLanguageValue(lang);
+ }
+ return false;
+}
+
bool OptionValueProperties::GetPropertyAtIndexAsArgs(
const ExecutionContext *exe_ctx, uint32_t idx, Args &args) const {
const Property *property = GetPropertyAtIndex(exe_ctx, false, idx);