summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-02-05 22:07:09 +0000
committerDavide Italiano <davide@freebsd.org>2016-02-05 22:07:09 +0000
commitd53536579425e45e32d9c7110d12f58c2d2b9964 (patch)
treeb65f9ebe57f6c62792fa2d7229e98ce3a2866c24
parentb3cd79bb4ebeee7e692e5e3328ad02124e13e0dd (diff)
downloadbcm5719-llvm-d53536579425e45e32d9c7110d12f58c2d2b9964.tar.gz
bcm5719-llvm-d53536579425e45e32d9c7110d12f58c2d2b9964.zip
[llvm-nm] Transform a switch() statement in a pair of if(s).
This is more uniform wrt what other tools do and makes the code a little bit more readable. llvm-svn: 259937
-rw-r--r--llvm/tools/llvm-nm/llvm-nm.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/tools/llvm-nm/llvm-nm.cpp b/llvm/tools/llvm-nm/llvm-nm.cpp
index 0c2c3391efd..48de3dbfe5a 100644
--- a/llvm/tools/llvm-nm/llvm-nm.cpp
+++ b/llvm/tools/llvm-nm/llvm-nm.cpp
@@ -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") {
OpenPOWER on IntegriCloud