[PATCH] Refactor: Simplify boolean expressions in tools/llvm-objdump
Richard
legalize at xmission.com
Mon May 25 11:57:09 PDT 2015
Hi rafael, rui314, Bigcheese, kledzik, majnemer, resistor, abdulras,
Use clang-tidy to simplify boolean expressions
http://reviews.llvm.org/D10005
Files:
tools/llvm-objdump/MachODump.cpp
Index: tools/llvm-objdump/MachODump.cpp
===================================================================
--- tools/llvm-objdump/MachODump.cpp
+++ tools/llvm-objdump/MachODump.cpp
@@ -4416,7 +4416,7 @@
if (cro.baseProperties + n_value != 0)
print_objc_property_list64(cro.baseProperties + n_value, info);
- is_meta_class = (cro.flags & RO_META) ? true : false;
+ is_meta_class = cro.flags & RO_META;
}
static void print_class_ro32_t(uint32_t p, struct DisassembleInfo *info,
@@ -4479,7 +4479,7 @@
<< format("0x%" PRIx32, cro.baseProperties) << "\n";
if (cro.baseProperties != 0)
print_objc_property_list32(cro.baseProperties, info);
- is_meta_class = (cro.flags & RO_META) ? true : false;
+ is_meta_class = cro.flags & RO_META;
}
static void print_class64_t(uint64_t p, struct DisassembleInfo *info) {
@@ -4551,7 +4551,7 @@
bool is_meta_class;
print_class_ro64_t((c.data + n_value) & ~0x7, info, is_meta_class);
- if (is_meta_class == false) {
+ if (!is_meta_class) {
outs() << "Meta Class\n";
print_class64_t(c.isa + isa_n_value, info);
}
@@ -4616,7 +4616,7 @@
bool is_meta_class;
print_class_ro32_t(c.data & ~0x3, info, is_meta_class);
- if (is_meta_class == false) {
+ if (!is_meta_class) {
outs() << "Meta Class\n";
print_class32_t(c.isa, info);
}
@@ -5618,7 +5618,7 @@
// binary for the iOS simulator which is the second Objective-C
// ABI. In that case printObjc1_32bit_MetaData() will determine that
// and return false.
- if (printObjc1_32bit_MetaData(O, verbose) == false)
+ if (!printObjc1_32bit_MetaData(O, verbose))
printObjc2_32bit_MetaData(O, verbose);
}
}
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10005.26470.patch
Type: text/x-patch
Size: 1708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150525/6f9e4614/attachment.bin>
More information about the llvm-commits
mailing list