Skip to content

Commit 0aa87fa

Browse files
committed
simplify
Created using spr 1.3.4
1 parent 14072a4 commit 0aa87fa

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

llvm/tools/llvm-size/llvm-size.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static std::vector<StringRef> ArchFlags;
7676
static bool ELFCommons;
7777
static OutputFormatTy OutputFormat;
7878
static bool DarwinLongFormat;
79-
static RadixTy Radix;
79+
static RadixTy Radix = RadixTy::decimal;
8080
static bool TotalSizes;
8181

8282
static std::vector<std::string> InputFilenames;
@@ -899,21 +899,17 @@ int llvm_size_main(int argc, char **argv, const llvm::ToolContext &) {
899899
OutputFormat = darwin;
900900
else if (V == "sysv")
901901
OutputFormat = sysv;
902-
else {
902+
else
903903
error("--format value should be one of: 'berkeley', 'darwin', 'sysv'");
904-
OutputFormat = berkeley;
905-
}
906904
V = Args.getLastArgValue(OPT_radix_EQ, "10");
907905
if (V == "8")
908906
Radix = RadixTy::octal;
909907
else if (V == "10")
910908
Radix = RadixTy::decimal;
911909
else if (V == "16")
912910
Radix = RadixTy::hexadecimal;
913-
else {
911+
else
914912
error("--radix value should be one of: 8, 10, 16 ");
915-
Radix = RadixTy::decimal;
916-
}
917913

918914
for (const auto *A : Args.filtered(OPT_arch_EQ)) {
919915
SmallVector<StringRef, 2> Values;

0 commit comments

Comments
 (0)