mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 08:24:12 +00:00
[llvm-readobj] Shrink code a little bit. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246976 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c9e28b8434
commit
2206b4bc38
@ -1399,42 +1399,15 @@ static void printArchiveChild(Archive::Child &C, bool verbose,
|
||||
// FIXME: this first dash, "-", is for (Mode & S_IFMT) == S_IFREG.
|
||||
// But there is nothing in sys::fs::perms for S_IFMT or S_IFREG.
|
||||
outs() << "-";
|
||||
if (Mode & sys::fs::owner_read)
|
||||
outs() << "r";
|
||||
else
|
||||
outs() << "-";
|
||||
if (Mode & sys::fs::owner_write)
|
||||
outs() << "w";
|
||||
else
|
||||
outs() << "-";
|
||||
if (Mode & sys::fs::owner_exe)
|
||||
outs() << "x";
|
||||
else
|
||||
outs() << "-";
|
||||
if (Mode & sys::fs::group_read)
|
||||
outs() << "r";
|
||||
else
|
||||
outs() << "-";
|
||||
if (Mode & sys::fs::group_write)
|
||||
outs() << "w";
|
||||
else
|
||||
outs() << "-";
|
||||
if (Mode & sys::fs::group_exe)
|
||||
outs() << "x";
|
||||
else
|
||||
outs() << "-";
|
||||
if (Mode & sys::fs::others_read)
|
||||
outs() << "r";
|
||||
else
|
||||
outs() << "-";
|
||||
if (Mode & sys::fs::others_write)
|
||||
outs() << "w";
|
||||
else
|
||||
outs() << "-";
|
||||
if (Mode & sys::fs::others_exe)
|
||||
outs() << "x";
|
||||
else
|
||||
outs() << "-";
|
||||
outs() << ((Mode & sys::fs::owner_read) ? "r" : "-");
|
||||
outs() << ((Mode & sys::fs::owner_write) ? "w" : "-");
|
||||
outs() << ((Mode & sys::fs::owner_exe) ? "x" : "-");
|
||||
outs() << ((Mode & sys::fs::group_read) ? "r" : "-");
|
||||
outs() << ((Mode & sys::fs::group_write) ? "w" : "-");
|
||||
outs() << ((Mode & sys::fs::group_exe) ? "x" : "-");
|
||||
outs() << ((Mode & sys::fs::others_read) ? "r" : "-");
|
||||
outs() << ((Mode & sys::fs::others_write) ? "w" : "-");
|
||||
outs() << ((Mode & sys::fs::others_exe) ? "x" : "-");
|
||||
} else {
|
||||
outs() << format("0%o ", Mode);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user