[llvm-reaodbj] Simplify code. No functional change (intended).

llvm-svn: 246676
This commit is contained in:
Davide Italiano 2015-09-02 16:53:25 +00:00
parent 77c8b7ffd3
commit 37ff06aedf
1 changed files with 8 additions and 24 deletions

View File

@ -7118,36 +7118,20 @@ static void PrintSegmentCommand(uint32_t cmd, uint32_t cmdsize,
MachO::VM_PROT_EXECUTE)) != 0)
outs() << " maxprot ?" << format("0x%08" PRIx32, maxprot) << "\n";
else {
if (maxprot & MachO::VM_PROT_READ)
outs() << " maxprot r";
else
outs() << " maxprot -";
if (maxprot & MachO::VM_PROT_WRITE)
outs() << "w";
else
outs() << "-";
if (maxprot & MachO::VM_PROT_EXECUTE)
outs() << "x\n";
else
outs() << "-\n";
outs() << " maxprot ";
outs() << ((maxprot & MachO::VM_PROT_READ) ? "r" : "-");
outs() << ((maxprot & MachO::VM_PROT_WRITE) ? "w" : "-");
outs() << ((maxprot & MachO::VM_PROT_EXECUTE) ? "x\n" : "-\n");
}
if ((initprot &
~(MachO::VM_PROT_READ | MachO::VM_PROT_WRITE |
MachO::VM_PROT_EXECUTE)) != 0)
outs() << " initprot ?" << format("0x%08" PRIx32, initprot) << "\n";
else {
if (initprot & MachO::VM_PROT_READ)
outs() << " initprot r";
else
outs() << " initprot -";
if (initprot & MachO::VM_PROT_WRITE)
outs() << "w";
else
outs() << "-";
if (initprot & MachO::VM_PROT_EXECUTE)
outs() << "x\n";
else
outs() << "-\n";
outs() << " initprot ";
outs() << ((initprot & MachO::VM_PROT_READ) ? "r" : "-");
outs() << ((initprot & MachO::VM_PROT_WRITE) ? "w" : "-");
outs() << ((initprot & MachO::VM_PROT_EXECUTE) ? "x\n" : "-\n");
}
} else {
outs() << " maxprot " << format("0x%08" PRIx32, maxprot) << "\n";