Simplify Boolean expressions

This patch simplifies boolean expressions acorss LLDB. It was generated
using clang-tidy with the following command:

run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD

Differential revision: https://reviews.llvm.org/D55584

llvm-svn: 349215
diff --git a/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp b/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
index 9295a09..04f9cbb 100644
--- a/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
@@ -100,10 +100,10 @@
     return false;
   }
   UnwindPlan::Row::RegisterLocation first_row_pc_loc;
-  if (first_row->GetRegisterInfo(
+  if (!first_row->GetRegisterInfo(
           pc_regnum.GetAsKind(unwind_plan.GetRegisterKind()),
-          first_row_pc_loc) == false ||
-      first_row_pc_loc.IsAtCFAPlusOffset() == false ||
+          first_row_pc_loc) ||
+      !first_row_pc_loc.IsAtCFAPlusOffset() ||
       first_row_pc_loc.GetOffset() != -wordsize) {
     return false;
   }
diff --git a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
index eb19898..f8e7020 100644
--- a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
@@ -304,26 +304,20 @@
 // pushq %rbp [0x55]
 bool x86AssemblyInspectionEngine::push_rbp_pattern_p() {
   uint8_t *p = m_cur_insn;
-  if (*p == 0x55)
-    return true;
-  return false;
+  return *p == 0x55;
 }
 
 // pushq $0 ; the first instruction in start() [0x6a 0x00]
 bool x86AssemblyInspectionEngine::push_0_pattern_p() {
   uint8_t *p = m_cur_insn;
-  if (*p == 0x6a && *(p + 1) == 0x0)
-    return true;
-  return false;
+  return *p == 0x6a && *(p + 1) == 0x0;
 }
 
 // pushq $0
 // pushl $0
 bool x86AssemblyInspectionEngine::push_imm_pattern_p() {
   uint8_t *p = m_cur_insn;
-  if (*p == 0x68 || *p == 0x6a)
-    return true;
-  return false;
+  return *p == 0x68 || *p == 0x6a;
 }
 
 // pushl imm8(%esp)
@@ -675,9 +669,7 @@
 // ret [0xc9] or [0xc2 imm8] or [0xca imm8]
 bool x86AssemblyInspectionEngine::ret_pattern_p() {
   uint8_t *p = m_cur_insn;
-  if (*p == 0xc9 || *p == 0xc2 || *p == 0xca || *p == 0xc3)
-    return true;
-  return false;
+  return *p == 0xc9 || *p == 0xc2 || *p == 0xca || *p == 0xc3;
 }
 
 uint32_t x86AssemblyInspectionEngine::extract_4(uint8_t *b) {
@@ -723,7 +715,7 @@
   if (data == nullptr || size == 0)
     return false;
 
-  if (m_register_map_initialized == false)
+  if (!m_register_map_initialized)
     return false;
 
   addr_t current_func_text_offset = 0;
@@ -864,7 +856,7 @@
       // on the stack
       if (nonvolatile_reg_p(machine_regno) &&
           machine_regno_to_lldb_regno(machine_regno, lldb_regno) &&
-          saved_registers[machine_regno] == false) {
+          !saved_registers[machine_regno]) {
         UnwindPlan::Row::RegisterLocation regloc;
         if (is_aligned)
             regloc.SetAtAFAPlusOffset(-current_sp_bytes_offset_from_fa);
@@ -881,7 +873,7 @@
 
       if (nonvolatile_reg_p(machine_regno) &&
           machine_regno_to_lldb_regno(machine_regno, lldb_regno) &&
-          saved_registers[machine_regno] == true) {
+          saved_registers[machine_regno]) {
         saved_registers[machine_regno] = false;
         row->RemoveRegisterInfo(lldb_regno);
 
@@ -953,7 +945,7 @@
     else if (mov_reg_to_local_stack_frame_p(machine_regno, stack_offset) &&
              nonvolatile_reg_p(machine_regno) &&
              machine_regno_to_lldb_regno(machine_regno, lldb_regno) &&
-             saved_registers[machine_regno] == false) {
+             !saved_registers[machine_regno]) {
       saved_registers[machine_regno] = true;
 
       UnwindPlan::Row::RegisterLocation regloc;
@@ -1081,7 +1073,7 @@
       }
     }
 
-    if (in_epilogue == false && row_updated) {
+    if (!in_epilogue && row_updated) {
       // If we're not in an epilogue sequence, save the updated Row
       UnwindPlan::Row *newrow = new UnwindPlan::Row;
       *newrow = *row.get();
@@ -1096,7 +1088,7 @@
 
     // We may change the sp value without adding a new Row necessarily -- keep
     // track of it either way.
-    if (in_epilogue == false) {
+    if (!in_epilogue) {
       prologue_completed_sp_bytes_offset_from_cfa =
           current_sp_bytes_offset_from_fa;
       prologue_completed_is_aligned = is_aligned;
@@ -1362,7 +1354,7 @@
     uint8_t *data, size_t size, size_t &offset) {
   offset = 0;
 
-  if (m_register_map_initialized == false)
+  if (!m_register_map_initialized)
     return false;
 
   while (offset < size) {