virtual lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
llvm::StringRef name,
Status &error) const {
- error.SetErrorStringWithFormat("'%s' is not a value subvalue", name.str().c_str());
+ error.SetErrorStringWithFormat("'%s' is not a value subvalue",
+ name.str().c_str());
return lldb::OptionValueSP();
}
Status &error);
OptionValueArch *GetAsArch();
-
const OptionValueArch *GetAsArch() const;
OptionValueArray *GetAsArray();
-
const OptionValueArray *GetAsArray() const;
OptionValueArgs *GetAsArgs();
-
const OptionValueArgs *GetAsArgs() const;
OptionValueBoolean *GetAsBoolean();
-
- OptionValueChar *GetAsChar();
-
const OptionValueBoolean *GetAsBoolean() const;
+ OptionValueChar *GetAsChar();
const OptionValueChar *GetAsChar() const;
OptionValueDictionary *GetAsDictionary();
-
const OptionValueDictionary *GetAsDictionary() const;
OptionValueEnumeration *GetAsEnumeration();
-
const OptionValueEnumeration *GetAsEnumeration() const;
OptionValueFileSpec *GetAsFileSpec();
-
const OptionValueFileSpec *GetAsFileSpec() const;
OptionValueFileSpecList *GetAsFileSpecList();
-
const OptionValueFileSpecList *GetAsFileSpecList() const;
OptionValueFormat *GetAsFormat();
-
const OptionValueFormat *GetAsFormat() const;
OptionValueLanguage *GetAsLanguage();
-
const OptionValueLanguage *GetAsLanguage() const;
OptionValuePathMappings *GetAsPathMappings();
-
const OptionValuePathMappings *GetAsPathMappings() const;
OptionValueProperties *GetAsProperties();
-
const OptionValueProperties *GetAsProperties() const;
OptionValueRegex *GetAsRegex();
-
const OptionValueRegex *GetAsRegex() const;
OptionValueSInt64 *GetAsSInt64();
-
const OptionValueSInt64 *GetAsSInt64() const;
OptionValueString *GetAsString();
-
const OptionValueString *GetAsString() const;
OptionValueUInt64 *GetAsUInt64();
-
const OptionValueUInt64 *GetAsUInt64() const;
OptionValueUUID *GetAsUUID();
-
const OptionValueUUID *GetAsUUID() const;
OptionValueFormatEntity *GetAsFormatEntity();
-
const OptionValueFormatEntity *GetAsFormatEntity() const;
bool AppendFileSpecValue(FileSpec file_spec);
}
bool OptionValue::SetBooleanValue(bool new_value) {
- OptionValueBoolean *option_value = GetAsBoolean();
- if (option_value) {
+ if (OptionValueBoolean *option_value = GetAsBoolean()) {
option_value->SetCurrentValue(new_value);
return true;
}
}
bool OptionValue::SetCharValue(char new_value) {
- OptionValueChar *option_value = GetAsChar();
- if (option_value) {
+ if (OptionValueChar *option_value = GetAsChar()) {
option_value->SetCurrentValue(new_value);
return true;
}
}
bool OptionValue::SetEnumerationValue(int64_t value) {
- OptionValueEnumeration *option_value = GetAsEnumeration();
- if (option_value) {
+ if (OptionValueEnumeration *option_value = GetAsEnumeration()) {
option_value->SetCurrentValue(value);
return true;
}
}
std::optional<FileSpec> OptionValue::GetFileSpecValue() const {
- const OptionValueFileSpec *option_value = GetAsFileSpec();
- if (option_value)
+ if (const OptionValueFileSpec *option_value = GetAsFileSpec())
return option_value->GetCurrentValue();
return {};
}
bool OptionValue::SetFileSpecValue(FileSpec file_spec) {
- OptionValueFileSpec *option_value = GetAsFileSpec();
- if (option_value) {
+ if (OptionValueFileSpec *option_value = GetAsFileSpec()) {
option_value->SetCurrentValue(file_spec, false);
return true;
}
}
bool OptionValue::SetFormatValue(lldb::Format new_value) {
- OptionValueFormat *option_value = GetAsFormat();
- if (option_value) {
+ if (OptionValueFormat *option_value = GetAsFormat()) {
option_value->SetCurrentValue(new_value);
return true;
}
}
bool OptionValue::SetLanguageValue(lldb::LanguageType new_language) {
- OptionValueLanguage *option_value = GetAsLanguage();
- if (option_value) {
+ if (OptionValueLanguage *option_value = GetAsLanguage()) {
option_value->SetCurrentValue(new_language);
return true;
}
}
const FormatEntity::Entry *OptionValue::GetFormatEntity() const {
- const OptionValueFormatEntity *option_value = GetAsFormatEntity();
- if (option_value)
+ if (const OptionValueFormatEntity *option_value = GetAsFormatEntity())
return &option_value->GetCurrentValue();
return nullptr;
}
const RegularExpression *OptionValue::GetRegexValue() const {
- const OptionValueRegex *option_value = GetAsRegex();
- if (option_value)
+ if (const OptionValueRegex *option_value = GetAsRegex())
return option_value->GetCurrentValue();
return nullptr;
}
}
bool OptionValue::SetSInt64Value(int64_t new_value) {
- OptionValueSInt64 *option_value = GetAsSInt64();
- if (option_value) {
+ if (OptionValueSInt64 *option_value = GetAsSInt64()) {
option_value->SetCurrentValue(new_value);
return true;
}
}
bool OptionValue::SetStringValue(llvm::StringRef new_value) {
- OptionValueString *option_value = GetAsString();
- if (option_value) {
+ if (OptionValueString *option_value = GetAsString()) {
option_value->SetCurrentValue(new_value);
return true;
}
}
bool OptionValue::SetUInt64Value(uint64_t new_value) {
- OptionValueUInt64 *option_value = GetAsUInt64();
- if (option_value) {
+ if (OptionValueUInt64 *option_value = GetAsUInt64()) {
option_value->SetCurrentValue(new_value);
return true;
}
}
bool OptionValue::SetUUIDValue(const UUID &uuid) {
- OptionValueUUID *option_value = GetAsUUID();
- if (option_value) {
+ if (OptionValueUUID *option_value = GetAsUUID()) {
option_value->SetCurrentValue(uuid);
return true;
}