@@ -71,9 +71,11 @@ ArchFlags("arch", cl::desc("architecture(s) from a Mach-O file to dump"),
71
71
static bool ArchAll = false ;
72
72
73
73
enum RadixTy { octal = 8 , decimal = 10 , hexadecimal = 16 };
74
- static cl::opt<unsigned int >
75
- Radix (" radix" , cl::desc(" Print size in radix. Only 8, 10, and 16 are valid" ),
76
- cl::init(decimal));
74
+ static cl::opt<RadixTy> Radix (
75
+ " radix" , cl::desc(" Print size in radix" ), cl::init(decimal),
76
+ cl::values(clEnumValN(octal, " 8" , " Print size in octal" ),
77
+ clEnumValN(decimal, " 10" , " Print size in decimal" ),
78
+ clEnumValN(hexadecimal, " 16" , " Print size in hexadecimal" )));
77
79
78
80
static cl::opt<RadixTy>
79
81
RadixShort (cl::desc(" Print size in radix:" ),
@@ -865,7 +867,7 @@ int main(int argc, char **argv) {
865
867
if (OutputFormatShort.getNumOccurrences ())
866
868
OutputFormat = static_cast <OutputFormatTy>(OutputFormatShort);
867
869
if (RadixShort.getNumOccurrences ())
868
- Radix = RadixShort;
870
+ Radix = RadixShort. getValue () ;
869
871
870
872
for (unsigned i = 0 ; i < ArchFlags.size (); ++i) {
871
873
if (ArchFlags[i] == " all" ) {
0 commit comments