diff options
author | Greg Clayton <gclayton@apple.com> | 2011-10-07 18:58:12 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-10-07 18:58:12 +0000 |
commit | cf0e4f0dafe445ae2ca9228e41767944329f30c4 (patch) | |
tree | 2b40b1c1cb173b2ceb6b3f77b41c52c22b1f9be0 /lldb/source/Core/UserSettingsController.cpp | |
parent | 08d0491006c28c92e18de9e108ad09e6333d4fed (diff) | |
download | bcm5719-llvm-cf0e4f0dafe445ae2ca9228e41767944329f30c4.tar.gz bcm5719-llvm-cf0e4f0dafe445ae2ca9228e41767944329f30c4.zip |
Re-organized the contents of RangeMap.h to be more concise and also allow for a Range, RangeArray, RangeData (range + data), or a RangeDataArray. We have many range implementations in LLDB and I will be converting over to using the classes in RangeMap.h so we can have one set of code that does ranges and searching of ranges.
Fixed up DWARFDebugAranges to use the new range classes.
Fixed the enumeration parsing to take a lldb_private::Error to avoid a lot of duplicated code. Now when an invalid enumeration is supplied, an error will be returned and that error will contain a list of the valid enumeration values.
llvm-svn: 141382
Diffstat (limited to 'lldb/source/Core/UserSettingsController.cpp')
-rw-r--r-- | lldb/source/Core/UserSettingsController.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lldb/source/Core/UserSettingsController.cpp b/lldb/source/Core/UserSettingsController.cpp index 332652aa305..a33b9154c78 100644 --- a/lldb/source/Core/UserSettingsController.cpp +++ b/lldb/source/Core/UserSettingsController.cpp @@ -2381,14 +2381,9 @@ void UserSettingsController::UpdateEnumVariable (OptionEnumValueElement *enum_values, int *enum_var, const char *new_value, - Error &err) + Error &error) { - bool found_one; - - *enum_var = Args::StringToOptionEnum (new_value, enum_values, enum_values[0].value, &found_one); - - if (!found_one) - err.SetErrorString ("Invalid enumeration value; cannot update variable.\n"); + *enum_var = Args::StringToOptionEnum (new_value, enum_values, enum_values[0].value, error); } void |