Skip to content

Commit

Permalink
[llvm-nm] Transform a switch() statement in a pair of if(s).
Browse files Browse the repository at this point in the history
This is more uniform wrt what other tools do and makes the code
a little bit more readable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259937 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dcci committed Feb 5, 2016
1 parent 409c554 commit 48d378b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tools/llvm-nm/llvm-nm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1267,15 +1267,10 @@ int main(int argc, char **argv) {
PrintAddress = false;
if (OutputFormat == sysv || SizeSort)
PrintSize = true;

switch (InputFilenames.size()) {
case 0:
if (InputFilenames.size() == 0)
InputFilenames.push_back("a.out");
case 1:
break;
default:
if (InputFilenames.size() > 1)
MultipleFiles = true;
}

for (unsigned i = 0; i < ArchFlags.size(); ++i) {
if (ArchFlags[i] == "all") {
Expand Down

0 comments on commit 48d378b

Please sign in to comment.