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.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141382 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectTarget.cpp b/source/Commands/CommandObjectTarget.cpp
index f948d0f..2be8e8d 100644
--- a/source/Commands/CommandObjectTarget.cpp
+++ b/source/Commands/CommandObjectTarget.cpp
@@ -1876,17 +1876,10 @@
             switch (short_option)
             {
                 case 's':
-                {
-                    bool found_one = false;
                     m_sort_order = (SortOrder) Args::StringToOptionEnum (option_arg, 
                                                                          g_option_table[option_idx].enum_values, 
                                                                          eSortOrderNone,
-                                                                         &found_one);
-                    if (!found_one)
-                        error.SetErrorStringWithFormat("Invalid enumeration value '%s' for option '%c'.\n", 
-                                                       option_arg, 
-                                                       short_option);
-                }
+                                                                         error);
                     break;
                     
                 default: