Skip to content

Commit

Permalink
[llvm-ar] Simplify the code.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253138 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dcci committed Nov 14, 2015
1 parent 61dca03 commit 40f8af0
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions tools/llvm-ar/llvm-ar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40f8af0

Please sign in to comment.