diff options
author | Davide Italiano <davide@freebsd.org> | 2015-11-14 18:25:18 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2015-11-14 18:25:18 +0000 |
commit | c529c7fda67788f441304d36b4db6f08b9456457 (patch) | |
tree | 62b2f8a9491fadf9fe239faaa6e4f484d5e08a3e /llvm/tools/llvm-ar/llvm-ar.cpp | |
parent | f7aaf0474307756b9375f00f87640ed4aeb08b55 (diff) | |
download | bcm5719-llvm-c529c7fda67788f441304d36b4db6f08b9456457.tar.gz bcm5719-llvm-c529c7fda67788f441304d36b4db6f08b9456457.zip |
[llvm-ar] Simplify the code.
llvm-svn: 253138
Diffstat (limited to 'llvm/tools/llvm-ar/llvm-ar.cpp')
-rw-r--r-- | llvm/tools/llvm-ar/llvm-ar.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp index 093f7f9e35d..cac46d2e50b 100644 --- a/llvm/tools/llvm-ar/llvm-ar.cpp +++ b/llvm/tools/llvm-ar/llvm-ar.cpp @@ -312,18 +312,9 @@ static void doPrint(StringRef Name, const object::Archive::Child &C) { // Utility function for printing out the file mode when the 't' operation is in // verbose mode. static void printMode(unsigned mode) { - if (mode & 004) - outs() << "r"; - else - outs() << "-"; - if (mode & 002) - outs() << "w"; - else - outs() << "-"; - if (mode & 001) - outs() << "x"; - else - outs() << "-"; + outs() << ((mode & 004) ? "r" : "-"); + outs() << ((mode & 002) ? "w" : "-"); + outs() << ((mode & 001) ? "x" : "-"); } // Implement the 't' operation. This function prints out just |