[llvm] r255443 - [llvm-objdump/MachoDump] Simplify.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 12 13:50:11 PST 2015
Author: davide
Date: Sat Dec 12 15:50:11 2015
New Revision: 255443
URL: http://llvm.org/viewvc/llvm-project?rev=255443&view=rev
Log:
[llvm-objdump/MachoDump] Simplify.
Modified:
llvm/trunk/tools/llvm-objdump/MachODump.cpp
Modified: llvm/trunk/tools/llvm-objdump/MachODump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/MachODump.cpp?rev=255443&r1=255442&r2=255443&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Sat Dec 12 15:50:11 2015
@@ -666,13 +666,9 @@ static void DumpLiteral8(MachOObjectFile
double d) {
outs() << format("0x%08" PRIx32, l0) << " " << format("0x%08" PRIx32, l1);
uint32_t Hi, Lo;
- if (O->isLittleEndian()) {
- Hi = l1;
- Lo = l0;
- } else {
- Hi = l0;
- Lo = l1;
- }
+ Hi = (O->isLittleEndian()) ? l1 : l0;
+ Lo = (O->isLittleEndian()) ? l0 : l1;
+
// Hi is the high word, so this is equivalent to if(isfinite(d))
if ((Hi & 0x7ff00000) != 0x7ff00000)
outs() << format(" (%.16e)\n", d);
More information about the llvm-commits
mailing list