[Lldb-commits] [lldb] r349215 - Simplify Boolean expressions
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 14 16:15:34 PST 2018
Author: jdevlieghere
Date: Fri Dec 14 16:15:33 2018
New Revision: 349215
URL: http://llvm.org/viewvc/llvm-project?rev=349215&view=rev
Log:
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
Modified:
lldb/trunk/include/lldb/Core/ModuleSpec.h
lldb/trunk/include/lldb/DataFormatters/TypeCategory.h
lldb/trunk/include/lldb/Symbol/Symtab.h
lldb/trunk/include/lldb/Target/Thread.h
lldb/trunk/include/lldb/Utility/StructuredData.h
lldb/trunk/source/API/SBQueue.cpp
lldb/trunk/source/API/SBThread.cpp
lldb/trunk/source/API/SBType.cpp
lldb/trunk/source/API/SBTypeCategory.cpp
lldb/trunk/source/API/SBTypeFilter.cpp
lldb/trunk/source/API/SBTypeFormat.cpp
lldb/trunk/source/API/SBTypeNameSpecifier.cpp
lldb/trunk/source/API/SBTypeSummary.cpp
lldb/trunk/source/API/SBTypeSynthetic.cpp
lldb/trunk/source/API/SBValue.cpp
lldb/trunk/source/Breakpoint/Watchpoint.cpp
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Commands/CommandObjectQuit.cpp
lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
lldb/trunk/source/Core/Disassembler.cpp
lldb/trunk/source/Core/Mangled.cpp
lldb/trunk/source/Core/SearchFilter.cpp
lldb/trunk/source/Core/SourceManager.cpp
lldb/trunk/source/Core/ValueObject.cpp
lldb/trunk/source/Core/ValueObjectChild.cpp
lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp
lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
lldb/trunk/source/DataFormatters/CXXFunctionPointer.cpp
lldb/trunk/source/DataFormatters/DataVisualization.cpp
lldb/trunk/source/DataFormatters/DumpValueObjectOptions.cpp
lldb/trunk/source/DataFormatters/FormatManager.cpp
lldb/trunk/source/DataFormatters/StringPrinter.cpp
lldb/trunk/source/DataFormatters/TypeCategory.cpp
lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp
lldb/trunk/source/DataFormatters/TypeFormat.cpp
lldb/trunk/source/DataFormatters/TypeSummary.cpp
lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
lldb/trunk/source/Expression/DWARFExpression.cpp
lldb/trunk/source/Expression/ExpressionSourceCode.cpp
lldb/trunk/source/Expression/Materializer.cpp
lldb/trunk/source/Host/common/Editline.cpp
lldb/trunk/source/Host/common/FileCache.cpp
lldb/trunk/source/Host/common/ProcessRunLock.cpp
lldb/trunk/source/Host/common/Symbols.cpp
lldb/trunk/source/Host/common/XML.cpp
lldb/trunk/source/Host/macosx/Symbols.cpp
lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.cpp
lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp
lldb/trunk/source/Host/macosx/objcxx/Host.mm
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
lldb/trunk/source/Interpreter/CommandObject.cpp
lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
lldb/trunk/source/Interpreter/OptionValueProperties.cpp
lldb/trunk/source/Interpreter/Options.cpp
lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
lldb/trunk/source/Plugins/Language/ObjC/CF.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSString.cpp
lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp
lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp
lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
lldb/trunk/source/Symbol/Block.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/ClangASTImporter.cpp
lldb/trunk/source/Symbol/CompactUnwindInfo.cpp
lldb/trunk/source/Symbol/CompileUnit.cpp
lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp
lldb/trunk/source/Symbol/FuncUnwinders.cpp
lldb/trunk/source/Symbol/ObjectFile.cpp
lldb/trunk/source/Symbol/SymbolContext.cpp
lldb/trunk/source/Symbol/Symtab.cpp
lldb/trunk/source/Symbol/Type.cpp
lldb/trunk/source/Symbol/TypeSystem.cpp
lldb/trunk/source/Target/Platform.cpp
lldb/trunk/source/Target/QueueItem.cpp
lldb/trunk/source/Target/RegisterNumber.cpp
lldb/trunk/source/Target/StackFrame.cpp
lldb/trunk/source/Target/StopInfo.cpp
lldb/trunk/source/Target/TargetList.cpp
lldb/trunk/source/Target/ThreadPlanBase.cpp
lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp
lldb/trunk/source/Utility/ArchSpec.cpp
lldb/trunk/source/Utility/Listener.cpp
lldb/trunk/source/Utility/RegisterValue.cpp
lldb/trunk/source/Utility/StructuredData.cpp
lldb/trunk/tools/debugserver/source/JSONGenerator.h
lldb/trunk/tools/debugserver/source/MacOSX/Genealogy.cpp
lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp
lldb/trunk/tools/debugserver/source/MacOSX/MachVMRegion.cpp
lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp
lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
lldb/trunk/tools/debugserver/source/RNBRemote.cpp
lldb/trunk/tools/debugserver/source/RNBServices.cpp
lldb/trunk/tools/debugserver/source/libdebugserver.cpp
lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp
lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp
lldb/trunk/tools/lldb-mi/MICmdArgValString.cpp
lldb/trunk/tools/lldb-mi/MICmdArgValThreadGrp.cpp
lldb/trunk/tools/lldb-mi/MICmdFactory.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
lldb/trunk/tools/lldb-mi/MICmnLog.cpp
lldb/trunk/tools/lldb-mi/MIUtilMapIdToVariant.cpp
lldb/trunk/tools/lldb-mi/MIUtilString.cpp
lldb/trunk/tools/lldb-vscode/JSONUtils.cpp
Modified: lldb/trunk/include/lldb/Core/ModuleSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleSpec.h?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ModuleSpec.h (original)
+++ lldb/trunk/include/lldb/Core/ModuleSpec.h Fri Dec 14 16:15:33 2018
@@ -255,20 +255,20 @@ public:
if (match_module_spec.GetFileSpecPtr()) {
const FileSpec &fspec = match_module_spec.GetFileSpec();
if (!FileSpec::Equal(fspec, GetFileSpec(),
- fspec.GetDirectory().IsEmpty() == false))
+ !fspec.GetDirectory().IsEmpty()))
return false;
}
if (GetPlatformFileSpec() && match_module_spec.GetPlatformFileSpecPtr()) {
const FileSpec &fspec = match_module_spec.GetPlatformFileSpec();
if (!FileSpec::Equal(fspec, GetPlatformFileSpec(),
- fspec.GetDirectory().IsEmpty() == false))
+ !fspec.GetDirectory().IsEmpty()))
return false;
}
// Only match the symbol file spec if there is one in this ModuleSpec
if (GetSymbolFileSpec() && match_module_spec.GetSymbolFileSpecPtr()) {
const FileSpec &fspec = match_module_spec.GetSymbolFileSpec();
if (!FileSpec::Equal(fspec, GetSymbolFileSpec(),
- fspec.GetDirectory().IsEmpty() == false))
+ !fspec.GetDirectory().IsEmpty()))
return false;
}
if (match_module_spec.GetArchitecturePtr()) {
Modified: lldb/trunk/include/lldb/DataFormatters/TypeCategory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeCategory.h?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/TypeCategory.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeCategory.h Fri Dec 14 16:15:33 2018
@@ -344,7 +344,7 @@ public:
bool IsEnabled() const { return m_enabled; }
uint32_t GetEnabledPosition() {
- if (m_enabled == false)
+ if (!m_enabled)
return UINT32_MAX;
else
return m_enabled_position;
Modified: lldb/trunk/include/lldb/Symbol/Symtab.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symtab.h?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Symtab.h (original)
+++ lldb/trunk/include/lldb/Symbol/Symtab.h Fri Dec 14 16:15:33 2018
@@ -168,12 +168,12 @@ private:
Visibility symbol_visibility) const {
switch (symbol_debug_type) {
case eDebugNo:
- if (m_symbols[idx].IsDebug() == true)
+ if (m_symbols[idx].IsDebug())
return false;
break;
case eDebugYes:
- if (m_symbols[idx].IsDebug() == false)
+ if (!m_symbols[idx].IsDebug())
return false;
break;
Modified: lldb/trunk/include/lldb/Target/Thread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Thread.h?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Thread.h (original)
+++ lldb/trunk/include/lldb/Target/Thread.h Fri Dec 14 16:15:33 2018
@@ -280,7 +280,7 @@ public:
/// message).
//------------------------------------------------------------------
StructuredData::ObjectSP GetExtendedInfo() {
- if (m_extended_info_fetched == false) {
+ if (!m_extended_info_fetched) {
m_extended_info = FetchThreadExtendedInfo();
m_extended_info_fetched = true;
}
Modified: lldb/trunk/include/lldb/Utility/StructuredData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StructuredData.h?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StructuredData.h (original)
+++ lldb/trunk/include/lldb/Utility/StructuredData.h Fri Dec 14 16:15:33 2018
@@ -170,7 +170,7 @@ public:
bool
ForEach(std::function<bool(Object *object)> const &foreach_callback) const {
for (const auto &object_sp : m_items) {
- if (foreach_callback(object_sp.get()) == false)
+ if (!foreach_callback(object_sp.get()))
return false;
}
return true;
@@ -359,7 +359,7 @@ public:
void ForEach(std::function<bool(ConstString key, Object *object)> const
&callback) const {
for (const auto &pair : m_dict) {
- if (callback(pair.first, pair.second.get()) == false)
+ if (!callback(pair.first, pair.second.get()))
break;
}
}
Modified: lldb/trunk/source/API/SBQueue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBQueue.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/API/SBQueue.cpp (original)
+++ lldb/trunk/source/API/SBQueue.cpp Fri Dec 14 16:15:33 2018
@@ -107,7 +107,7 @@ public:
}
void FetchThreads() {
- if (m_thread_list_fetched == false) {
+ if (!m_thread_list_fetched) {
lldb::QueueSP queue_sp = m_queue_wp.lock();
if (queue_sp) {
Process::StopLocker stop_locker;
@@ -127,7 +127,7 @@ public:
}
void FetchItems() {
- if (m_pending_items_fetched == false) {
+ if (!m_pending_items_fetched) {
QueueSP queue_sp = m_queue_wp.lock();
if (queue_sp) {
Process::StopLocker stop_locker;
@@ -178,7 +178,7 @@ public:
uint32_t result = 0;
QueueSP queue_sp = m_queue_wp.lock();
- if (m_pending_items_fetched == false && queue_sp) {
+ if (!m_pending_items_fetched && queue_sp) {
result = queue_sp->GetNumPendingWorkItems();
} else {
result = m_pending_items.size();
Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Fri Dec 14 16:15:33 2018
@@ -571,7 +571,7 @@ bool SBThread::GetInfoItemByPathAsString
success = true;
}
if (node->GetType() == eStructuredDataTypeBoolean) {
- if (node->GetAsBoolean()->GetValue() == true)
+ if (node->GetAsBoolean()->GetValue())
strm.Printf("true");
else
strm.Printf("false");
@@ -1470,7 +1470,7 @@ SBThread SBThread::GetExtendedBacktraceT
}
}
- if (log && sb_origin_thread.IsValid() == false)
+ if (log && !sb_origin_thread.IsValid())
log->Printf("SBThread(%p)::GetExtendedBacktraceThread() is not returning a "
"Valid thread",
static_cast<void *>(exe_ctx.GetThreadPtr()));
Modified: lldb/trunk/source/API/SBType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBType.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/API/SBType.cpp (original)
+++ lldb/trunk/source/API/SBType.cpp Fri Dec 14 16:15:33 2018
@@ -47,20 +47,20 @@ SBType::SBType(const SBType &rhs) : m_op
//{}
//
bool SBType::operator==(SBType &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
- if (rhs.IsValid() == false)
+ if (!rhs.IsValid())
return false;
return *m_opaque_sp.get() == *rhs.m_opaque_sp.get();
}
bool SBType::operator!=(SBType &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return rhs.IsValid();
- if (rhs.IsValid() == false)
+ if (!rhs.IsValid())
return true;
return *m_opaque_sp.get() != *rhs.m_opaque_sp.get();
Modified: lldb/trunk/source/API/SBTypeCategory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeCategory.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeCategory.cpp (original)
+++ lldb/trunk/source/API/SBTypeCategory.cpp Fri Dec 14 16:15:33 2018
@@ -529,14 +529,14 @@ operator=(const lldb::SBTypeCategory &rh
}
bool SBTypeCategory::operator==(lldb::SBTypeCategory &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
return m_opaque_sp.get() == rhs.m_opaque_sp.get();
}
bool SBTypeCategory::operator!=(lldb::SBTypeCategory &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return rhs.IsValid();
return m_opaque_sp.get() != rhs.m_opaque_sp.get();
Modified: lldb/trunk/source/API/SBTypeFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeFilter.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeFilter.cpp (original)
+++ lldb/trunk/source/API/SBTypeFilter.cpp Fri Dec 14 16:15:33 2018
@@ -91,14 +91,14 @@ lldb::SBTypeFilter &SBTypeFilter::operat
}
bool SBTypeFilter::operator==(lldb::SBTypeFilter &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
return m_opaque_sp == rhs.m_opaque_sp;
}
bool SBTypeFilter::IsEqualTo(lldb::SBTypeFilter &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
if (GetNumberOfExpressionPaths() != rhs.GetNumberOfExpressionPaths())
@@ -113,7 +113,7 @@ bool SBTypeFilter::IsEqualTo(lldb::SBTyp
}
bool SBTypeFilter::operator!=(lldb::SBTypeFilter &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
return m_opaque_sp != rhs.m_opaque_sp;
Modified: lldb/trunk/source/API/SBTypeFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeFormat.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeFormat.cpp (original)
+++ lldb/trunk/source/API/SBTypeFormat.cpp Fri Dec 14 16:15:33 2018
@@ -88,13 +88,13 @@ lldb::SBTypeFormat &SBTypeFormat::operat
}
bool SBTypeFormat::operator==(lldb::SBTypeFormat &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
return m_opaque_sp == rhs.m_opaque_sp;
}
bool SBTypeFormat::IsEqualTo(lldb::SBTypeFormat &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
if (GetFormat() == rhs.GetFormat())
@@ -104,7 +104,7 @@ bool SBTypeFormat::IsEqualTo(lldb::SBTyp
}
bool SBTypeFormat::operator!=(lldb::SBTypeFormat &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
return m_opaque_sp != rhs.m_opaque_sp;
}
Modified: lldb/trunk/source/API/SBTypeNameSpecifier.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeNameSpecifier.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeNameSpecifier.cpp (original)
+++ lldb/trunk/source/API/SBTypeNameSpecifier.cpp Fri Dec 14 16:15:33 2018
@@ -80,13 +80,13 @@ operator=(const lldb::SBTypeNameSpecifie
}
bool SBTypeNameSpecifier::operator==(lldb::SBTypeNameSpecifier &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
return m_opaque_sp == rhs.m_opaque_sp;
}
bool SBTypeNameSpecifier::IsEqualTo(lldb::SBTypeNameSpecifier &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
if (IsRegex() != rhs.IsRegex())
@@ -98,7 +98,7 @@ bool SBTypeNameSpecifier::IsEqualTo(lldb
}
bool SBTypeNameSpecifier::operator!=(lldb::SBTypeNameSpecifier &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
return m_opaque_sp != rhs.m_opaque_sp;
}
Modified: lldb/trunk/source/API/SBTypeSummary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeSummary.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeSummary.cpp (original)
+++ lldb/trunk/source/API/SBTypeSummary.cpp Fri Dec 14 16:15:33 2018
@@ -261,7 +261,7 @@ lldb::SBTypeSummary &SBTypeSummary::oper
}
bool SBTypeSummary::operator==(lldb::SBTypeSummary &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
return m_opaque_sp == rhs.m_opaque_sp;
}
@@ -305,7 +305,7 @@ bool SBTypeSummary::IsEqualTo(lldb::SBTy
}
bool SBTypeSummary::operator!=(lldb::SBTypeSummary &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
return m_opaque_sp != rhs.m_opaque_sp;
}
Modified: lldb/trunk/source/API/SBTypeSynthetic.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeSynthetic.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeSynthetic.cpp (original)
+++ lldb/trunk/source/API/SBTypeSynthetic.cpp Fri Dec 14 16:15:33 2018
@@ -106,13 +106,13 @@ operator=(const lldb::SBTypeSynthetic &r
}
bool SBTypeSynthetic::operator==(lldb::SBTypeSynthetic &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
return m_opaque_sp == rhs.m_opaque_sp;
}
bool SBTypeSynthetic::IsEqualTo(lldb::SBTypeSynthetic &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
if (m_opaque_sp->IsScripted() != rhs.m_opaque_sp->IsScripted())
@@ -128,7 +128,7 @@ bool SBTypeSynthetic::IsEqualTo(lldb::SB
}
bool SBTypeSynthetic::operator!=(lldb::SBTypeSynthetic &rhs) {
- if (IsValid() == false)
+ if (!IsValid())
return !rhs.IsValid();
return m_opaque_sp != rhs.m_opaque_sp;
}
Modified: lldb/trunk/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Fri Dec 14 16:15:33 2018
@@ -98,10 +98,7 @@ public:
// they depend on. So I have no good way to make that check without
// tracking that in all the ValueObject subclasses.
TargetSP target_sp = m_valobj_sp->GetTargetSP();
- if (target_sp && target_sp->IsValid())
- return true;
- else
- return false;
+ return target_sp && target_sp->IsValid();
}
}
Modified: lldb/trunk/source/Breakpoint/Watchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Watchpoint.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Watchpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Watchpoint.cpp Fri Dec 14 16:15:33 2018
@@ -131,10 +131,7 @@ void Watchpoint::IncrementFalseAlarmsAnd
bool Watchpoint::ShouldStop(StoppointCallbackContext *context) {
IncrementHitCount();
- if (!IsEnabled())
- return false;
-
- return true;
+ return IsEnabled();
}
void Watchpoint::GetDescription(Stream *s, lldb::DescriptionLevel level) {
Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Fri Dec 14 16:15:33 2018
@@ -420,8 +420,7 @@ bool CommandObjectExpression::EvaluateEx
if (m_command_options.auto_apply_fixits == eLazyBoolCalculate)
auto_apply_fixits = target->GetEnableAutoApplyFixIts();
else
- auto_apply_fixits =
- m_command_options.auto_apply_fixits == eLazyBoolYes ? true : false;
+ auto_apply_fixits = m_command_options.auto_apply_fixits == eLazyBoolYes;
options.SetAutoApplyFixIts(auto_apply_fixits);
Modified: lldb/trunk/source/Commands/CommandObjectQuit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectQuit.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectQuit.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectQuit.cpp Fri Dec 14 16:15:33 2018
@@ -31,7 +31,7 @@ CommandObjectQuit::~CommandObjectQuit()
// if all alive processes will be detached when you quit and false if at least
// one process will be killed instead
bool CommandObjectQuit::ShouldAskForConfirmation(bool &is_a_detach) {
- if (m_interpreter.GetPromptOnQuit() == false)
+ if (!m_interpreter.GetPromptOnQuit())
return false;
bool should_prompt = false;
is_a_detach = true;
@@ -51,7 +51,7 @@ bool CommandObjectQuit::ShouldAskForConf
if (process_sp && process_sp->IsValid() && process_sp->IsAlive() &&
process_sp->WarnBeforeDetach()) {
should_prompt = true;
- if (process_sp->GetShouldDetach() == false) {
+ if (!process_sp->GetShouldDetach()) {
// if we need to kill at least one process, just say so and return
is_a_detach = false;
return should_prompt;
Modified: lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp Fri Dec 14 16:15:33 2018
@@ -138,11 +138,9 @@ bool CommandObjectMultiwordWatchpoint::V
return false;
wp_ids.push_back(beg);
}
- // It is an error if after the loop, we're still in_range.
- if (in_range)
- return false;
- return true; // Success!
+ // It is an error if after the loop, we're still in_range.
+ return !in_range;
}
//-------------------------------------------------------------------------
Modified: lldb/trunk/source/Core/Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Disassembler.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Core/Disassembler.cpp (original)
+++ lldb/trunk/source/Core/Disassembler.cpp Fri Dec 14 16:15:33 2018
@@ -452,8 +452,7 @@ bool Disassembler::PrintInstructions(Dis
if (mixed_source_and_assembly && sc.line_entry.IsValid()) {
if (sc.symbol != previous_symbol) {
SourceLine decl_line = GetFunctionDeclLineEntry(sc);
- if (ElideMixedSourceAndDisassemblyLine(exe_ctx, sc, decl_line) ==
- false)
+ if (!ElideMixedSourceAndDisassemblyLine(exe_ctx, sc, decl_line))
AddLineToSourceLineTables(decl_line, source_lines_seen);
}
if (sc.line_entry.IsValid()) {
@@ -461,8 +460,7 @@ bool Disassembler::PrintInstructions(Dis
this_line.file = sc.line_entry.file;
this_line.line = sc.line_entry.line;
this_line.column = sc.line_entry.column;
- if (ElideMixedSourceAndDisassemblyLine(exe_ctx, sc, this_line) ==
- false)
+ if (!ElideMixedSourceAndDisassemblyLine(exe_ctx, sc, this_line))
AddLineToSourceLineTables(this_line, source_lines_seen);
}
}
@@ -506,8 +504,8 @@ bool Disassembler::PrintInstructions(Dis
previous_symbol = sc.symbol;
if (sc.function && sc.line_entry.IsValid()) {
LineEntry prologue_end_line = sc.line_entry;
- if (ElideMixedSourceAndDisassemblyLine(
- exe_ctx, sc, prologue_end_line) == false) {
+ if (!ElideMixedSourceAndDisassemblyLine(exe_ctx, sc,
+ prologue_end_line)) {
FileSpec func_decl_file;
uint32_t func_decl_line;
sc.function->GetStartLineSourceInfo(func_decl_file,
@@ -547,8 +545,8 @@ bool Disassembler::PrintInstructions(Dis
this_line.file = sc.line_entry.file;
this_line.line = sc.line_entry.line;
- if (ElideMixedSourceAndDisassemblyLine(exe_ctx, sc,
- this_line) == false) {
+ if (!ElideMixedSourceAndDisassemblyLine(exe_ctx, sc,
+ this_line)) {
// Only print this source line if it is different from the
// last source line we printed. There may have been inlined
// functions between these lines that we elided, resulting in
Modified: lldb/trunk/source/Core/Mangled.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Mangled.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Core/Mangled.cpp (original)
+++ lldb/trunk/source/Core/Mangled.cpp Fri Dec 14 16:15:33 2018
@@ -419,9 +419,7 @@ bool Mangled::NameMatches(const RegularE
return true;
ConstString demangled = GetDemangledName(language);
- if (demangled && regex.Execute(demangled.AsCString()))
- return true;
- return false;
+ return demangled && regex.Execute(demangled.AsCString());
}
//----------------------------------------------------------------------
Modified: lldb/trunk/source/Core/SearchFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Core/SearchFilter.cpp (original)
+++ lldb/trunk/source/Core/SearchFilter.cpp Fri Dec 14 16:15:33 2018
@@ -388,10 +388,7 @@ SearchFilterForUnconstrainedSearches::Se
bool SearchFilterForUnconstrainedSearches::ModulePasses(
const FileSpec &module_spec) {
- if (m_target_sp->ModuleIsExcludedForUnconstrainedSearches(module_spec))
- return false;
- else
- return true;
+ return !m_target_sp->ModuleIsExcludedForUnconstrainedSearches(module_spec);
}
bool SearchFilterForUnconstrainedSearches::ModulePasses(
@@ -570,22 +567,15 @@ bool SearchFilterByModuleList::ModulePas
if (m_module_spec_list.GetSize() == 0)
return true;
- if (module_sp &&
- m_module_spec_list.FindFileIndex(0, module_sp->GetFileSpec(), false) !=
- UINT32_MAX)
- return true;
- else
- return false;
+ return module_sp && m_module_spec_list.FindFileIndex(
+ 0, module_sp->GetFileSpec(), false) != UINT32_MAX;
}
bool SearchFilterByModuleList::ModulePasses(const FileSpec &spec) {
if (m_module_spec_list.GetSize() == 0)
return true;
- if (m_module_spec_list.FindFileIndex(0, spec, true) != UINT32_MAX)
- return true;
- else
- return false;
+ return m_module_spec_list.FindFileIndex(0, spec, true) != UINT32_MAX;
}
bool SearchFilterByModuleList::AddressPasses(Address &address) {
Modified: lldb/trunk/source/Core/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SourceManager.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Core/SourceManager.cpp (original)
+++ lldb/trunk/source/Core/SourceManager.cpp Fri Dec 14 16:15:33 2018
@@ -486,7 +486,7 @@ uint32_t SourceManager::File::GetLineLen
if (end_offset > start_offset) {
uint32_t length = end_offset - start_offset;
- if (include_newline_chars == false) {
+ if (!include_newline_chars) {
const char *line_start =
(const char *)m_data_sp->GetBytes() + start_offset;
while (length > 0) {
Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Fri Dec 14 16:15:33 2018
@@ -214,7 +214,7 @@ bool ValueObject::UpdateValueIfNeeded(bo
if (first_update)
SetValueDidChange(false);
- else if (!m_value_did_change && success == false) {
+ else if (!m_value_did_change && !success) {
// The value wasn't gotten successfully, so we mark this as changed if
// the value used to be valid and now isn't
SetValueDidChange(value_was_valid);
@@ -442,10 +442,7 @@ bool ValueObject::IsLogicalTrue(Status &
}
bool ret;
- if (scalar_value.ULongLong(1) == 0)
- ret = false;
- else
- ret = true;
+ ret = scalar_value.ULongLong(1) != 0;
error.Clear();
return ret;
}
@@ -639,7 +636,7 @@ ValueObject *ValueObject::CreateChildAtI
bool child_is_deref_of_parent = false;
uint64_t language_flags = 0;
- const bool transparent_pointers = synthetic_array_member == false;
+ const bool transparent_pointers = !synthetic_array_member;
CompilerType child_compiler_type;
ExecutionContext exe_ctx(GetExecutionContextRef());
@@ -1921,11 +1918,11 @@ ValueObject::GetSyntheticExpressionPathC
}
void ValueObject::CalculateSyntheticValue(bool use_synthetic) {
- if (use_synthetic == false)
+ if (!use_synthetic)
return;
TargetSP target_sp(GetTargetSP());
- if (target_sp && target_sp->GetEnableSyntheticValue() == false) {
+ if (target_sp && !target_sp->GetEnableSyntheticValue()) {
m_synthetic_value = NULL;
return;
}
@@ -1976,7 +1973,7 @@ ValueObjectSP ValueObject::GetStaticValu
lldb::ValueObjectSP ValueObject::GetNonSyntheticValue() { return GetSP(); }
ValueObjectSP ValueObject::GetSyntheticValue(bool use_synthetic) {
- if (use_synthetic == false)
+ if (!use_synthetic)
return ValueObjectSP();
CalculateSyntheticValue(use_synthetic);
@@ -1995,10 +1992,7 @@ bool ValueObject::HasSyntheticValue() {
CalculateSyntheticValue(true);
- if (m_synthetic_value)
- return true;
- else
- return false;
+ return m_synthetic_value != nullptr;
}
bool ValueObject::GetBaseClassPath(Stream &s) {
@@ -3195,7 +3189,7 @@ ValueObject *
ValueObject::FollowParentChain(std::function<bool(ValueObject *)> f) {
ValueObject *vo = this;
while (vo) {
- if (f(vo) == false)
+ if (!f(vo))
break;
vo = vo->m_parent;
}
@@ -3264,8 +3258,7 @@ bool ValueObject::CanProvideValue() {
// board debugging scenarios have no notion of types, but still manage to
// have raw numeric values for things like registers. sigh.
const CompilerType &type(GetCompilerType());
- return (false == type.IsValid()) ||
- (0 != (type.GetTypeInfo() & eTypeHasValue));
+ return (!type.IsValid()) || (0 != (type.GetTypeInfo() & eTypeHasValue));
}
bool ValueObject::IsChecksumEmpty() { return m_value_checksum.empty(); }
Modified: lldb/trunk/source/Core/ValueObjectChild.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectChild.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectChild.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectChild.cpp Fri Dec 14 16:15:33 2018
@@ -124,7 +124,7 @@ bool ValueObjectChild::UpdateValue() {
Flags parent_type_flags(parent_type.GetTypeInfo());
const bool is_instance_ptr_base =
- ((m_is_base_class == true) &&
+ ((m_is_base_class) &&
(parent_type_flags.AnySet(lldb::eTypeInstanceIsPointer)));
if (parent->GetCompilerType().ShouldTreatScalarValueAsAddress()) {
@@ -142,7 +142,7 @@ bool ValueObjectChild::UpdateValue() {
switch (addr_type) {
case eAddressTypeFile: {
lldb::ProcessSP process_sp(GetProcessSP());
- if (process_sp && process_sp->IsAlive() == true)
+ if (process_sp && process_sp->IsAlive())
m_value.SetValueType(Value::eValueTypeLoadAddress);
else
m_value.SetValueType(Value::eValueTypeFileAddress);
Modified: lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp Fri Dec 14 16:15:33 2018
@@ -66,7 +66,7 @@ ValueObject *ValueObjectConstResultImpl:
bool child_is_deref_of_parent = false;
uint64_t language_flags;
- const bool transparent_pointers = synthetic_array_member == false;
+ const bool transparent_pointers = !synthetic_array_member;
CompilerType compiler_type = m_impl_backend->GetCompilerType();
CompilerType child_compiler_type;
Modified: lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp Fri Dec 14 16:15:33 2018
@@ -119,7 +119,7 @@ bool ValueObjectSynthetic::MightHaveChil
if (m_might_have_children == eLazyBoolCalculate)
m_might_have_children =
(m_synth_filter_ap->MightHaveChildren() ? eLazyBoolYes : eLazyBoolNo);
- return (m_might_have_children == eLazyBoolNo ? false : true);
+ return (m_might_have_children != eLazyBoolNo);
}
uint64_t ValueObjectSynthetic::GetByteSize() { return m_parent->GetByteSize(); }
@@ -174,7 +174,7 @@ bool ValueObjectSynthetic::UpdateValue()
}
// let our backend do its update
- if (m_synth_filter_ap->Update() == false) {
+ if (!m_synth_filter_ap->Update()) {
if (log)
log->Printf("[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
"filter said caches are stale - clearing",
@@ -235,7 +235,7 @@ lldb::ValueObjectSP ValueObjectSynthetic
UpdateValueIfNeeded();
ValueObject *valobj;
- if (m_children_byindex.GetValueForKey(idx, valobj) == false) {
+ if (!m_children_byindex.GetValueForKey(idx, valobj)) {
if (can_create && m_synth_filter_ap.get() != nullptr) {
if (log)
log->Printf("[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at "
Modified: lldb/trunk/source/DataFormatters/CXXFunctionPointer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/CXXFunctionPointer.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/CXXFunctionPointer.cpp (original)
+++ lldb/trunk/source/DataFormatters/CXXFunctionPointer.cpp Fri Dec 14 16:15:33 2018
@@ -38,7 +38,7 @@ bool lldb_private::formatters::CXXFuncti
Address so_addr;
Target *target = exe_ctx.GetTargetPtr();
- if (target && target->GetSectionLoadList().IsEmpty() == false) {
+ if (target && !target->GetSectionLoadList().IsEmpty()) {
if (target->GetSectionLoadList().ResolveLoadAddress(func_ptr_address,
so_addr)) {
so_addr.Dump(&sstr, exe_ctx.GetBestExecutionContextScope(),
Modified: lldb/trunk/source/DataFormatters/DataVisualization.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/DataVisualization.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/DataVisualization.cpp (original)
+++ lldb/trunk/source/DataFormatters/DataVisualization.cpp Fri Dec 14 16:15:33 2018
@@ -145,7 +145,7 @@ void DataVisualization::Categories::Enab
}
void DataVisualization::Categories::Disable(const ConstString &category) {
- if (GetFormatManager().GetCategory(category)->IsEnabled() == true)
+ if (GetFormatManager().GetCategory(category)->IsEnabled())
GetFormatManager().DisableCategory(category);
}
@@ -166,7 +166,7 @@ void DataVisualization::Categories::Enab
void DataVisualization::Categories::Disable(
const lldb::TypeCategoryImplSP &category) {
- if (category.get() && category->IsEnabled() == true)
+ if (category.get() && category->IsEnabled())
GetFormatManager().DisableCategory(category);
}
Modified: lldb/trunk/source/DataFormatters/DumpValueObjectOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/DumpValueObjectOptions.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/DumpValueObjectOptions.cpp (original)
+++ lldb/trunk/source/DataFormatters/DumpValueObjectOptions.cpp Fri Dec 14 16:15:33 2018
@@ -67,7 +67,7 @@ DumpValueObjectOptions &DumpValueObjectO
}
DumpValueObjectOptions &DumpValueObjectOptions::SetShowSummary(bool show) {
- if (show == false)
+ if (!show)
SetOmitSummaryDepth(UINT32_MAX);
else
SetOmitSummaryDepth(0);
Modified: lldb/trunk/source/DataFormatters/FormatManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/FormatManager.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/FormatManager.cpp (original)
+++ lldb/trunk/source/DataFormatters/FormatManager.cpp Fri Dec 14 16:15:33 2018
@@ -293,7 +293,7 @@ FormatManager::GetFormatForType(lldb::Ty
uint32_t prio_category = UINT32_MAX;
for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
category_sp = GetCategoryAtIndex(category_id);
- if (category_sp->IsEnabled() == false)
+ if (!category_sp->IsEnabled())
continue;
lldb::TypeFormatImplSP format_current_sp =
category_sp->GetFormatForType(type_sp);
@@ -317,7 +317,7 @@ FormatManager::GetSummaryForType(lldb::T
uint32_t prio_category = UINT32_MAX;
for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
category_sp = GetCategoryAtIndex(category_id);
- if (category_sp->IsEnabled() == false)
+ if (!category_sp->IsEnabled())
continue;
lldb::TypeSummaryImplSP summary_current_sp =
category_sp->GetSummaryForType(type_sp);
@@ -341,7 +341,7 @@ FormatManager::GetFilterForType(lldb::Ty
uint32_t prio_category = UINT32_MAX;
for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
category_sp = GetCategoryAtIndex(category_id);
- if (category_sp->IsEnabled() == false)
+ if (!category_sp->IsEnabled())
continue;
lldb::TypeFilterImplSP filter_current_sp(
(TypeFilterImpl *)category_sp->GetFilterForType(type_sp).get());
@@ -366,7 +366,7 @@ FormatManager::GetSyntheticForType(lldb:
uint32_t prio_category = UINT32_MAX;
for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
category_sp = GetCategoryAtIndex(category_id);
- if (category_sp->IsEnabled() == false)
+ if (!category_sp->IsEnabled())
continue;
lldb::ScriptedSyntheticChildrenSP synth_current_sp(
(ScriptedSyntheticChildren *)category_sp->GetSyntheticForType(type_sp)
@@ -406,7 +406,7 @@ FormatManager::GetValidatorForType(lldb:
uint32_t prio_category = UINT32_MAX;
for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
category_sp = GetCategoryAtIndex(category_id);
- if (category_sp->IsEnabled() == false)
+ if (!category_sp->IsEnabled())
continue;
lldb::TypeValidatorImplSP validator_current_sp(
category_sp->GetValidatorForType(type_sp).get());
@@ -479,7 +479,7 @@ lldb::Format FormatManager::GetSingleIte
bool FormatManager::ShouldPrintAsOneLiner(ValueObject &valobj) {
// if settings say no oneline whatsoever
if (valobj.GetTargetSP().get() &&
- valobj.GetTargetSP()->GetDebugger().GetAutoOneLineSummaries() == false)
+ !valobj.GetTargetSP()->GetDebugger().GetAutoOneLineSummaries())
return false; // then don't oneline
// if this object has a summary, then ask the summary
@@ -535,7 +535,7 @@ bool FormatManager::ShouldPrintAsOneLine
if (!synth_sp)
return false;
// but if we only have them to provide a value, keep going
- if (synth_sp->MightHaveChildren() == false &&
+ if (!synth_sp->MightHaveChildren() &&
synth_sp->DoesProvideSyntheticValue())
is_synth_val = true;
else
Modified: lldb/trunk/source/DataFormatters/StringPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/StringPrinter.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/StringPrinter.cpp (original)
+++ lldb/trunk/source/DataFormatters/StringPrinter.cpp Fri Dec 14 16:15:33 2018
@@ -312,7 +312,7 @@ static bool DumpUTFBufferToStream(
utf8_data_end_ptr = utf8_data_ptr + utf8_data_buffer_sp->GetByteSize();
ConvertFunction(&data_ptr, data_end_ptr, &utf8_data_ptr,
utf8_data_end_ptr, llvm::lenientConversion);
- if (false == zero_is_terminator)
+ if (!zero_is_terminator)
utf8_data_end_ptr = utf8_data_ptr;
// needed because the ConvertFunction will change the value of the
// data_ptr.
Modified: lldb/trunk/source/DataFormatters/TypeCategory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeCategory.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/TypeCategory.cpp (original)
+++ lldb/trunk/source/DataFormatters/TypeCategory.cpp Fri Dec 14 16:15:33 2018
@@ -157,10 +157,7 @@ bool TypeCategoryImpl::Get(ValueObject &
else /*if (filter_sp.get() && synth.get())*/
{
- if (filter_sp->GetRevision() > synth->GetRevision())
- pick_synth = false;
- else
- pick_synth = true;
+ pick_synth = filter_sp->GetRevision() <= synth->GetRevision();
}
if (pick_synth) {
if (regex_synth && reason)
Modified: lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp (original)
+++ lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp Fri Dec 14 16:15:33 2018
@@ -118,8 +118,7 @@ void TypeCategoryMap::EnableAllCategorie
void TypeCategoryMap::DisableAllCategories() {
std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
- Position p = First;
- for (; false == m_active_categories.empty(); p++) {
+ for (Position p = First; !m_active_categories.empty(); p++) {
m_active_categories.front()->SetEnabledPosition(p);
Disable(m_active_categories.front());
}
Modified: lldb/trunk/source/DataFormatters/TypeFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeFormat.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/TypeFormat.cpp (original)
+++ lldb/trunk/source/DataFormatters/TypeFormat.cpp Fri Dec 14 16:15:33 2018
@@ -178,7 +178,7 @@ bool TypeFormatImpl_EnumType::FormatObje
}
} else
valobj_enum_type = iter->second;
- if (valobj_enum_type.IsValid() == false)
+ if (!valobj_enum_type.IsValid())
return false;
DataExtractor data;
Status error;
Modified: lldb/trunk/source/DataFormatters/TypeSummary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeSummary.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/TypeSummary.cpp (original)
+++ lldb/trunk/source/DataFormatters/TypeSummary.cpp Fri Dec 14 16:15:33 2018
@@ -135,7 +135,7 @@ bool CXXFunctionSummaryFormat::FormatObj
const TypeSummaryOptions &options) {
dest.clear();
StreamString stream;
- if (!m_impl || m_impl(*valobj, stream, options) == false)
+ if (!m_impl || !m_impl(*valobj, stream, options))
return false;
dest = stream.GetString();
return true;
Modified: lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp (original)
+++ lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp Fri Dec 14 16:15:33 2018
@@ -129,13 +129,13 @@ bool ValueObjectPrinter::GetMostSpeciali
}
if (m_valobj->IsSynthetic()) {
- if (m_options.m_use_synthetic == false) {
+ if (!m_options.m_use_synthetic) {
ValueObject *non_synthetic = m_valobj->GetNonSyntheticValue().get();
if (non_synthetic)
m_valobj = non_synthetic;
}
} else {
- if (m_options.m_use_synthetic == true) {
+ if (m_options.m_use_synthetic) {
ValueObject *synthetic = m_valobj->GetSyntheticValue().get();
if (synthetic)
m_valobj = synthetic;
@@ -166,7 +166,7 @@ const char *ValueObjectPrinter::GetRootN
bool ValueObjectPrinter::ShouldPrintValueObject() {
if (m_should_print == eLazyBoolCalculate)
m_should_print =
- (m_options.m_flat_output == false || m_type_flags.Test(eTypeHasValue))
+ (!m_options.m_flat_output || m_type_flags.Test(eTypeHasValue))
? eLazyBoolYes
: eLazyBoolNo;
return m_should_print == eLazyBoolYes;
@@ -326,7 +326,7 @@ bool ValueObjectPrinter::CheckScopeIfNee
}
TypeSummaryImpl *ValueObjectPrinter::GetSummaryFormatter(bool null_if_omitted) {
- if (m_summary_formatter.second == false) {
+ if (!m_summary_formatter.second) {
TypeSummaryImpl *entry = m_options.m_summary_sp
? m_options.m_summary_sp.get()
: m_valobj->GetSummaryFormat().get();
@@ -458,7 +458,7 @@ bool ValueObjectPrinter::PrintObjectDesc
else
m_stream->Printf("%s\n", object_desc);
return true;
- } else if (value_printed == false && summary_printed == false)
+ } else if (!value_printed && !summary_printed)
return true;
else
return false;
@@ -625,7 +625,7 @@ bool ValueObjectPrinter::ShouldPrintEmpt
if (!IsAggregate())
return false;
- if (m_options.m_reveal_empty_aggregates == false) {
+ if (!m_options.m_reveal_empty_aggregates) {
if (value_printed || summary_printed)
return false;
}
Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Fri Dec 14 16:15:33 2018
@@ -1839,7 +1839,7 @@ bool DWARFExpression::Evaluate(
error_ptr->SetErrorString(
"Expression stack needs at least 1 item for DW_OP_abs.");
return false;
- } else if (stack.back().ResolveValue(exe_ctx).AbsoluteValue() == false) {
+ } else if (!stack.back().ResolveValue(exe_ctx).AbsoluteValue()) {
if (error_ptr)
error_ptr->SetErrorString(
"Failed to take the absolute value of the first stack item.");
@@ -1972,7 +1972,7 @@ bool DWARFExpression::Evaluate(
"Expression stack needs at least 1 item for DW_OP_neg.");
return false;
} else {
- if (stack.back().ResolveValue(exe_ctx).UnaryNegate() == false) {
+ if (!stack.back().ResolveValue(exe_ctx).UnaryNegate()) {
if (error_ptr)
error_ptr->SetErrorString("Unary negate failed.");
return false;
@@ -1993,7 +1993,7 @@ bool DWARFExpression::Evaluate(
"Expression stack needs at least 1 item for DW_OP_not.");
return false;
} else {
- if (stack.back().ResolveValue(exe_ctx).OnesComplement() == false) {
+ if (!stack.back().ResolveValue(exe_ctx).OnesComplement()) {
if (error_ptr)
error_ptr->SetErrorString("Logical NOT failed.");
return false;
@@ -2100,8 +2100,8 @@ bool DWARFExpression::Evaluate(
} else {
tmp = stack.back();
stack.pop_back();
- if (stack.back().ResolveValue(exe_ctx).ShiftRightLogical(
- tmp.ResolveValue(exe_ctx)) == false) {
+ if (!stack.back().ResolveValue(exe_ctx).ShiftRightLogical(
+ tmp.ResolveValue(exe_ctx))) {
if (error_ptr)
error_ptr->SetErrorString("DW_OP_shr failed.");
return false;
Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
+++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Fri Dec 14 16:15:33 2018
@@ -105,10 +105,7 @@ public:
if (m_file_stack.back() != m_current_file)
return true;
- if (line >= m_current_file_line)
- return false;
- else
- return true;
+ return line < m_current_file_line;
default:
return false;
}
@@ -378,7 +375,5 @@ bool ExpressionSourceCode::GetOriginalBo
return false;
start_loc += strlen(start_marker);
end_loc = transformed_text.find(end_marker);
- if (end_loc == std::string::npos)
- return false;
- return true;
+ return end_loc != std::string::npos;
}
Modified: lldb/trunk/source/Expression/Materializer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Expression/Materializer.cpp (original)
+++ lldb/trunk/source/Expression/Materializer.cpp Fri Dec 14 16:15:33 2018
@@ -528,7 +528,7 @@ public:
if (data.GetByteSize() < m_variable_sp->GetType()->GetByteSize()) {
if (data.GetByteSize() == 0 &&
- m_variable_sp->LocationExpression().IsValid() == false) {
+ !m_variable_sp->LocationExpression().IsValid()) {
err.SetErrorStringWithFormat("the variable '%s' has no location, "
"it may have been optimized out",
m_variable_sp->GetName().AsCString());
Modified: lldb/trunk/source/Host/common/Editline.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Editline.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Editline.cpp (original)
+++ lldb/trunk/source/Host/common/Editline.cpp Fri Dec 14 16:15:33 2018
@@ -430,7 +430,7 @@ unsigned char Editline::RecallHistory(bo
// Treat moving from the "live" entry differently
if (!m_in_history) {
- if (earlier == false)
+ if (!earlier)
return CC_ERROR; // Can't go newer than the "live" entry
if (history_w(pHistory, &history_event, H_FIRST) == -1)
return CC_ERROR;
Modified: lldb/trunk/source/Host/common/FileCache.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/FileCache.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/FileCache.cpp (original)
+++ lldb/trunk/source/Host/common/FileCache.cpp Fri Dec 14 16:15:33 2018
@@ -32,7 +32,7 @@ lldb::user_id_t FileCache::OpenFile(cons
}
FileSP file_sp(new File());
error = FileSystem::Instance().Open(*file_sp, file_spec, flags, mode);
- if (file_sp->IsValid() == false)
+ if (!file_sp->IsValid())
return UINT64_MAX;
lldb::user_id_t fd = file_sp->GetDescriptor();
m_cache[fd] = file_sp;
Modified: lldb/trunk/source/Host/common/ProcessRunLock.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/ProcessRunLock.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/ProcessRunLock.cpp (original)
+++ lldb/trunk/source/Host/common/ProcessRunLock.cpp Fri Dec 14 16:15:33 2018
@@ -30,7 +30,7 @@ ProcessRunLock::~ProcessRunLock() {
bool ProcessRunLock::ReadTryLock() {
::pthread_rwlock_rdlock(&m_rwlock);
- if (m_running == false) {
+ if (!m_running) {
return true;
}
::pthread_rwlock_unlock(&m_rwlock);
Modified: lldb/trunk/source/Host/common/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Symbols.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Symbols.cpp (original)
+++ lldb/trunk/source/Host/common/Symbols.cpp Fri Dec 14 16:15:33 2018
@@ -215,7 +215,7 @@ FileSpec LocateExecutableSymbolFileDsym(
ModuleSpec dsym_module_spec;
// First try and find the dSYM in the same directory as the executable or in
// an appropriate parent directory
- if (LocateDSYMInVincinityOfExecutable(module_spec, symbol_fspec) == false) {
+ if (!LocateDSYMInVincinityOfExecutable(module_spec, symbol_fspec)) {
// We failed to easily find the dSYM above, so use DebugSymbols
LocateMacOSXFilesUsingDebugSymbols(module_spec, dsym_module_spec);
} else {
Modified: lldb/trunk/source/Host/common/XML.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/XML.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/XML.cpp (original)
+++ lldb/trunk/source/Host/common/XML.cpp Fri Dec 14 16:15:33 2018
@@ -201,8 +201,7 @@ void XMLNode::ForEachAttribute(Attribute
llvm::StringRef attr_value;
if (child->content)
attr_value = llvm::StringRef((const char *)child->content);
- if (callback(llvm::StringRef((const char *)attr->name), attr_value) ==
- false)
+ if (!callback(llvm::StringRef((const char *)attr->name), attr_value))
return;
}
}
@@ -217,7 +216,7 @@ void XMLNode::ForEachSiblingNode(NodeCal
if (IsValid()) {
// iterate through all siblings
for (xmlNodePtr node = m_node; node; node = node->next) {
- if (callback(XMLNode(node)) == false)
+ if (!callback(XMLNode(node)))
return;
}
}
@@ -234,7 +233,7 @@ void XMLNode::ForEachSiblingElement(Node
if (node->type != XML_ELEMENT_NODE)
continue;
- if (callback(XMLNode(node)) == false)
+ if (!callback(XMLNode(node)))
return;
}
}
@@ -263,7 +262,7 @@ void XMLNode::ForEachSiblingElementWithN
// ignore this one
}
- if (callback(XMLNode(node)) == false)
+ if (!callback(XMLNode(node)))
return;
}
}
Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Fri Dec 14 16:15:33 2018
@@ -399,7 +399,7 @@ static bool GetModuleSpecInfoFromUUIDDic
// DBGSourcePath values (the "values" half of key-value path pairs)
// were wrong. Ignore them and use the universal DBGSourcePath
// string from earlier.
- if (new_style_source_remapping_dictionary == true &&
+ if (new_style_source_remapping_dictionary &&
!original_DBGSourcePath_value.empty()) {
DBGSourcePath = original_DBGSourcePath_value;
}
@@ -475,7 +475,7 @@ bool Symbols::DownloadObjectAndSymbolFil
// it once per lldb run and cache the result.
static bool g_have_checked_for_dbgshell_command = false;
static const char *g_dbgshell_command = NULL;
- if (g_have_checked_for_dbgshell_command == false) {
+ if (!g_have_checked_for_dbgshell_command) {
g_have_checked_for_dbgshell_command = true;
CFTypeRef defaults_setting = CFPreferencesCopyAppValue(
CFSTR("DBGShellCommands"), CFSTR("com.apple.DebugSymbols"));
@@ -495,7 +495,7 @@ bool Symbols::DownloadObjectAndSymbolFil
// When g_dbgshell_command is NULL, the user has not enabled the use of an
// external program to find the symbols, don't run it for them.
- if (force_lookup == false && g_dbgshell_command == NULL) {
+ if (!force_lookup && g_dbgshell_command == NULL) {
return false;
}
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.cpp (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.cpp Fri Dec 14 16:15:33 2018
@@ -88,7 +88,7 @@ bool CFCMutableArray::SetValueAtIndex(CF
bool CFCMutableArray::AppendValue(const void *value, bool can_create) {
CFMutableArrayRef array = get();
if (array == NULL) {
- if (can_create == false)
+ if (!can_create)
return false;
array =
::CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
@@ -106,7 +106,7 @@ bool CFCMutableArray::AppendCStringAsCFS
bool can_create) {
CFMutableArrayRef array = get();
if (array == NULL) {
- if (can_create == false)
+ if (!can_create)
return false;
array =
::CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
@@ -124,7 +124,7 @@ bool CFCMutableArray::AppendFileSystemRe
const char *s, bool can_create) {
CFMutableArrayRef array = get();
if (array == NULL) {
- if (can_create == false)
+ if (!can_create)
return false;
array =
::CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp Fri Dec 14 16:15:33 2018
@@ -60,7 +60,7 @@ const void *CFCMutableSet::GetValue(cons
const void *CFCMutableSet::AddValue(const void *value, bool can_create) {
CFMutableSetRef set = get();
if (set == NULL) {
- if (can_create == false)
+ if (!can_create)
return NULL;
set = ::CFSetCreateMutable(kCFAllocatorDefault, 0, &kCFTypeSetCallBacks);
reset(set);
Modified: lldb/trunk/source/Host/macosx/objcxx/Host.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/objcxx/Host.mm?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/objcxx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/objcxx/Host.mm Fri Dec 14 16:15:33 2018
@@ -486,11 +486,9 @@ static bool GetMacOSXProcessCPUType(Proc
bool host_cpu_is_64bit;
uint32_t is64bit_capable;
size_t is64bit_capable_len = sizeof(is64bit_capable);
- if (sysctlbyname("hw.cpu64bit_capable", &is64bit_capable,
- &is64bit_capable_len, NULL, 0) == 0)
- host_cpu_is_64bit = true;
- else
- host_cpu_is_64bit = false;
+ host_cpu_is_64bit =
+ sysctlbyname("hw.cpu64bit_capable", &is64bit_capable,
+ &is64bit_capable_len, NULL, 0) == 0;
// if the host is an armv8 device, its cpusubtype will be in
// CPU_SUBTYPE_ARM64 numbering
@@ -660,7 +658,7 @@ uint32_t Host::FindProcesses(const Proce
if (our_uid == 0)
kinfo_user_matches = true;
- if (kinfo_user_matches == false || // Make sure the user is acceptable
+ if (!kinfo_user_matches || // Make sure the user is acceptable
static_cast<lldb::pid_t>(kinfo.kp_proc.p_pid) ==
our_pid || // Skip this process
kinfo.kp_proc.p_pid == 0 || // Skip kernel (kernel pid is zero)
Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Fri Dec 14 16:15:33 2018
@@ -987,16 +987,16 @@ bool CommandInterpreter::AddUserCommand(
if (!name.empty()) {
// do not allow replacement of internal commands
if (CommandExists(name)) {
- if (can_replace == false)
+ if (!can_replace)
return false;
- if (m_command_dict[name]->IsRemovable() == false)
+ if (!m_command_dict[name]->IsRemovable())
return false;
}
if (UserCommandExists(name)) {
- if (can_replace == false)
+ if (!can_replace)
return false;
- if (m_user_dict[name]->IsRemovable() == false)
+ if (!m_user_dict[name]->IsRemovable())
return false;
}
@@ -2131,7 +2131,7 @@ void CommandInterpreter::SourceInitFile(
profilePath.AppendPathComponent(".lldbinit");
std::string init_file_path = profilePath.GetPath();
- if (m_skip_app_init_files == false) {
+ if (!m_skip_app_init_files) {
FileSpec program_file_spec(HostInfo::GetProgramFileSpec());
const char *program_name = program_file_spec.GetFilename().AsCString();
@@ -2769,7 +2769,7 @@ void CommandInterpreter::IOHandlerInputC
return;
const bool is_interactive = io_handler.GetIsInteractive();
- if (is_interactive == false) {
+ if (!is_interactive) {
// When we are not interactive, don't execute blank lines. This will happen
// sourcing a commands file. We don't want blank lines to repeat the
// previous command and cause any errors to occur (like redefining an
@@ -3018,8 +3018,7 @@ CommandInterpreter::ResolveCommandImpl(s
bool is_alias = GetAliasFullName(next_word, full_name);
cmd_obj = GetCommandObject(next_word, &matches);
bool is_real_command =
- (is_alias == false) ||
- (cmd_obj != nullptr && cmd_obj->IsAlias() == false);
+ (!is_alias) || (cmd_obj != nullptr && !cmd_obj->IsAlias());
if (!is_real_command) {
matches.Clear();
std::string alias_result;
Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Fri Dec 14 16:15:33 2018
@@ -409,15 +409,12 @@ const char *CommandObject::GetArgumentNa
}
bool CommandObject::IsPairType(ArgumentRepetitionType arg_repeat_type) {
- if ((arg_repeat_type == eArgRepeatPairPlain) ||
- (arg_repeat_type == eArgRepeatPairOptional) ||
- (arg_repeat_type == eArgRepeatPairPlus) ||
- (arg_repeat_type == eArgRepeatPairStar) ||
- (arg_repeat_type == eArgRepeatPairRange) ||
- (arg_repeat_type == eArgRepeatPairRangeOptional))
- return true;
-
- return false;
+ return (arg_repeat_type == eArgRepeatPairPlain) ||
+ (arg_repeat_type == eArgRepeatPairOptional) ||
+ (arg_repeat_type == eArgRepeatPairPlus) ||
+ (arg_repeat_type == eArgRepeatPairStar) ||
+ (arg_repeat_type == eArgRepeatPairRange) ||
+ (arg_repeat_type == eArgRepeatPairRangeOptional);
}
static CommandObject::CommandArgumentEntry
Modified: lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupVariable.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupVariable.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupVariable.cpp Fri Dec 14 16:15:33 2018
@@ -55,8 +55,8 @@ static Status ValidateNamedSummary(const
if (!str || !str[0])
return Status("must specify a valid named summary");
TypeSummaryImplSP summary_sp;
- if (DataVisualization::NamedSummaryFormats::GetSummaryFormat(
- ConstString(str), summary_sp) == false)
+ if (!DataVisualization::NamedSummaryFormats::GetSummaryFormat(
+ ConstString(str), summary_sp))
return Status("must specify a valid named summary");
return Status();
}
Modified: lldb/trunk/source/Interpreter/OptionValueProperties.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueProperties.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValueProperties.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValueProperties.cpp Fri Dec 14 16:15:33 2018
@@ -38,7 +38,7 @@ OptionValueProperties::OptionValueProper
for (size_t i = 0; i < num_properties; ++i) {
// Duplicate any values that are not global when constructing properties
// from a global copy
- if (m_properties[i].IsGlobal() == false) {
+ if (!m_properties[i].IsGlobal()) {
lldb::OptionValueSP new_value_sp(m_properties[i].GetValue()->DeepCopy());
m_properties[i].SetOptionValue(new_value_sp);
}
@@ -212,7 +212,7 @@ Status OptionValueProperties::SetSubValu
else {
// Don't set an error if the path contained .experimental. - those are
// allowed to be missing and should silently fail.
- if (name_contains_experimental == false && error.AsCString() == nullptr) {
+ if (!name_contains_experimental && error.AsCString() == nullptr) {
error.SetErrorStringWithFormat("invalid value path '%s'", name.str().c_str());
}
}
Modified: lldb/trunk/source/Interpreter/Options.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Options.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Options.cpp (original)
+++ lldb/trunk/source/Interpreter/Options.cpp Fri Dec 14 16:15:33 2018
@@ -457,7 +457,7 @@ void Options::GenerateOptionUsage(Stream
}
}
- if (options.empty() == false) {
+ if (!options.empty()) {
// We have some required options with no arguments
strm.PutCString(" -");
for (i = 0; i < 2; ++i)
@@ -476,14 +476,14 @@ void Options::GenerateOptionUsage(Stream
if (def.usage_mask & opt_set_mask && isprint8(def.short_option)) {
// Add current option to the end of out_stream.
- if (def.required == false &&
+ if (!def.required &&
def.option_has_arg == OptionParser::eNoArgument) {
options.insert(def.short_option);
}
}
}
- if (options.empty() == false) {
+ if (!options.empty()) {
// We have some required options with no arguments
strm.PutCString(" [-");
for (i = 0; i < 2; ++i)
Modified: lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp Fri Dec 14 16:15:33 2018
@@ -1440,10 +1440,7 @@ bool ABISysV_arm::PrepareTrivialCall(Thr
~1ull; // clear bit zero since the CPSR will take care of the mode for us
// Set "pc" to the address requested
- if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_num, function_addr))
- return false;
-
- return true;
+ return reg_ctx->WriteRegisterFromUnsigned(pc_reg_num, function_addr);
}
bool ABISysV_arm::GetArgumentValues(Thread &thread, ValueList &values) const {
Modified: lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h Fri Dec 14 16:15:33 2018
@@ -57,9 +57,7 @@ public:
bool CodeAddressIsValid(lldb::addr_t pc) override {
// Code addressed must be 2 byte aligned
- if (pc & 1ull)
- return false;
- return true;
+ return (pc & 1ull) == 0;
}
const lldb_private::RegisterInfo *
Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Fri Dec 14 16:15:33 2018
@@ -1336,10 +1336,7 @@ bool DisassemblerLLVMC::FlavorValidForAr
if (triple.getArch() == llvm::Triple::x86 ||
triple.getArch() == llvm::Triple::x86_64) {
- if (strcmp(flavor, "intel") == 0 || strcmp(flavor, "att") == 0)
- return true;
- else
- return false;
+ return strcmp(flavor, "intel") == 0 || strcmp(flavor, "att") == 0;
} else
return false;
}
Modified: lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp Fri Dec 14 16:15:33 2018
@@ -387,8 +387,8 @@ DynamicLoaderDarwinKernel::ReadMachHeade
if (::memcmp (&header.magic, &magicks[i], sizeof (uint32_t)) == 0)
found_matching_pattern = true;
- if (found_matching_pattern == false)
- return false;
+ if (!found_matching_pattern)
+ return false;
if (header.magic == llvm::MachO::MH_CIGAM ||
header.magic == llvm::MachO::MH_CIGAM_64) {
@@ -424,7 +424,7 @@ DynamicLoaderDarwinKernel::CheckForKerne
llvm::MachO::mach_header header;
- if (ReadMachHeader (addr, process, header) == false)
+ if (!ReadMachHeader(addr, process, header))
return UUID();
// First try a quick test -- read the first 4 bytes and see if there is a
@@ -604,16 +604,10 @@ void DynamicLoaderDarwinKernel::KextImag
bool DynamicLoaderDarwinKernel::KextImageInfo::
operator==(const KextImageInfo &rhs) {
if (m_uuid.IsValid() || rhs.GetUUID().IsValid()) {
- if (m_uuid == rhs.GetUUID()) {
- return true;
- }
- return false;
+ return m_uuid == rhs.GetUUID();
}
- if (m_name == rhs.GetName() && m_load_address == rhs.GetLoadAddress())
- return true;
-
- return false;
+ return m_name == rhs.GetName() && m_load_address == rhs.GetLoadAddress();
}
void DynamicLoaderDarwinKernel::KextImageInfo::SetName(const char *name) {
@@ -731,7 +725,7 @@ bool DynamicLoaderDarwinKernel::KextImag
}
bool DynamicLoaderDarwinKernel::KextImageInfo::IsKernel() const {
- return m_kernel_image == true;
+ return m_kernel_image;
}
void DynamicLoaderDarwinKernel::KextImageInfo::SetIsKernel(bool is_kernel) {
@@ -1280,7 +1274,7 @@ bool DynamicLoaderDarwinKernel::ParseKex
const uint32_t num_of_new_kexts = kext_summaries.size();
for (uint32_t new_kext = 0; new_kext < num_of_new_kexts; new_kext++) {
- if (to_be_added[new_kext] == true) {
+ if (to_be_added[new_kext]) {
KextImageInfo &image_info = kext_summaries[new_kext];
if (load_kexts) {
if (!image_info.LoadImageUsingMemoryModule(m_process)) {
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp Fri Dec 14 16:15:33 2018
@@ -359,16 +359,18 @@ bool DynamicLoaderDarwin::JSONImageInfor
if (image_sp.get() == nullptr || image_sp->GetAsDictionary() == nullptr)
return false;
StructuredData::Dictionary *image = image_sp->GetAsDictionary();
- if (image->HasKey("load_address") == false ||
- image->HasKey("pathname") == false ||
- image->HasKey("mod_date") == false ||
- image->HasKey("mach_header") == false ||
+ // clang-format off
+ if (!image->HasKey("load_address") ||
+ !image->HasKey("pathname") ||
+ !image->HasKey("mod_date") ||
+ !image->HasKey("mach_header") ||
image->GetValueForKey("mach_header")->GetAsDictionary() == nullptr ||
- image->HasKey("segments") == false ||
+ !image->HasKey("segments") ||
image->GetValueForKey("segments")->GetAsArray() == nullptr ||
- image->HasKey("uuid") == false) {
+ !image->HasKey("uuid")) {
return false;
}
+ // clang-format on
image_infos[i].address =
image->GetValueForKey("load_address")->GetAsInteger()->GetValue();
image_infos[i].mod_date =
@@ -712,11 +714,7 @@ bool DynamicLoaderDarwin::AlwaysRelyOnEH
return false;
ObjCLanguageRuntime *objc_runtime = m_process->GetObjCLanguageRuntime();
- if (objc_runtime != NULL && objc_runtime->IsModuleObjCLibrary(module_sp)) {
- return true;
- }
-
- return false;
+ return objc_runtime != NULL && objc_runtime->IsModuleObjCLibrary(module_sp);
}
//----------------------------------------------------------------------
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp Fri Dec 14 16:15:33 2018
@@ -65,7 +65,7 @@ DynamicLoader *DynamicLoaderMacOS::Creat
}
}
- if (UseDYLDSPI(process) == false) {
+ if (!UseDYLDSPI(process)) {
create = false;
}
@@ -503,8 +503,7 @@ bool DynamicLoaderMacOS::GetSharedCacheI
info_dict->GetValueForKey("shared_cache_uuid")->GetStringValue();
if (!uuid_str.empty())
uuid.SetFromStringRef(uuid_str);
- if (info_dict->GetValueForKey("no_shared_cache")->GetBooleanValue() ==
- false)
+ if (!info_dict->GetValueForKey("no_shared_cache")->GetBooleanValue())
using_shared_cache = eLazyBoolYes;
else
using_shared_cache = eLazyBoolNo;
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Fri Dec 14 16:15:33 2018
@@ -85,7 +85,7 @@ DynamicLoader *DynamicLoaderMacOSXDYLD::
}
}
- if (UseDYLDSPI(process) == true) {
+ if (UseDYLDSPI(process)) {
create = false;
}
@@ -122,12 +122,12 @@ bool DynamicLoaderMacOSXDYLD::ProcessDid
// value differs from the Process' image info address. When a process
// execs itself it might cause a change if ASLR is enabled.
const addr_t shlib_addr = m_process->GetImageInfoAddress();
- if (m_process_image_addr_is_all_images_infos == true &&
+ if (m_process_image_addr_is_all_images_infos &&
shlib_addr != m_dyld_all_image_infos_addr) {
// The image info address from the process is the
// 'dyld_all_image_infos' address and it has changed.
did_exec = true;
- } else if (m_process_image_addr_is_all_images_infos == false &&
+ } else if (!m_process_image_addr_is_all_images_infos &&
shlib_addr == m_dyld.address) {
// The image info address from the process is the mach_header address
// for dyld and it has changed.
Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp Fri Dec 14 16:15:33 2018
@@ -455,14 +455,10 @@ static bool isLoadBiasIncorrect(Target &
// On Android L (API 21, 22) the load address of the "/system/bin/linker"
// isn't filled in correctly.
unsigned os_major = target.GetPlatform()->GetOSVersion().getMajor();
- if (target.GetArchitecture().GetTriple().isAndroid() &&
- (os_major == 21 || os_major == 22) &&
- (file_path == "/system/bin/linker" ||
- file_path == "/system/bin/linker64")) {
- return true;
- }
-
- return false;
+ return target.GetArchitecture().GetTriple().isAndroid() &&
+ (os_major == 21 || os_major == 22) &&
+ (file_path == "/system/bin/linker" ||
+ file_path == "/system/bin/linker64");
}
void DYLDRendezvous::UpdateBaseAddrIfNecessary(SOEntry &entry,
Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Fri Dec 14 16:15:33 2018
@@ -117,7 +117,7 @@ void DynamicLoaderPOSIXDYLD::DidAttach()
EvalSpecialModulesStatus();
// if we dont have a load address we cant re-base
- bool rebase_exec = (load_offset == LLDB_INVALID_ADDRESS) ? false : true;
+ bool rebase_exec = load_offset != LLDB_INVALID_ADDRESS;
// if we have a valid executable
if (executable_sp.get()) {
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp Fri Dec 14 16:15:33 2018
@@ -778,12 +778,9 @@ bool ClangASTSource::IgnoreName(const Co
StringRef name_string_ref = name.GetStringRef();
// The ClangASTSource is not responsible for finding $-names.
- if (name_string_ref.empty() ||
- (ignore_all_dollar_names && name_string_ref.startswith("$")) ||
- name_string_ref.startswith("_$"))
- return true;
-
- return false;
+ return name_string_ref.empty() ||
+ (ignore_all_dollar_names && name_string_ref.startswith("$")) ||
+ name_string_ref.startswith("_$");
}
void ClangASTSource::FindExternalVisibleDecls(
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp Fri Dec 14 16:15:33 2018
@@ -778,11 +778,8 @@ bool IRForTarget::RewriteObjCConstString
static bool IsObjCSelectorRef(Value *value) {
GlobalVariable *global_variable = dyn_cast<GlobalVariable>(value);
- if (!global_variable || !global_variable->hasName() ||
- !global_variable->getName().startswith("OBJC_SELECTOR_REFERENCES_"))
- return false;
-
- return true;
+ return !(!global_variable || !global_variable->hasName() ||
+ !global_variable->getName().startswith("OBJC_SELECTOR_REFERENCES_"));
}
// This function does not report errors; its callers are responsible.
@@ -953,11 +950,8 @@ bool IRForTarget::RewriteObjCSelectors(B
static bool IsObjCClassReference(Value *value) {
GlobalVariable *global_variable = dyn_cast<GlobalVariable>(value);
- if (!global_variable || !global_variable->hasName() ||
- !global_variable->getName().startswith("OBJC_CLASS_REFERENCES_"))
- return false;
-
- return true;
+ return !(!global_variable || !global_variable->hasName() ||
+ !global_variable->getName().startswith("OBJC_CLASS_REFERENCES_"));
}
// This function does not report errors; its callers are responsible.
@@ -1259,12 +1253,9 @@ bool IRForTarget::MaterializeInitializer
llvm::NextPowerOf2(constant_size) * 8);
lldb_private::Status get_data_error;
- if (!scalar.GetAsMemoryData(data, constant_size,
- lldb_private::endian::InlHostByteOrder(),
- get_data_error))
- return false;
-
- return true;
+ return scalar.GetAsMemoryData(data, constant_size,
+ lldb_private::endian::InlHostByteOrder(),
+ get_data_error) != 0;
} else if (ConstantDataArray *array_initializer =
dyn_cast<ConstantDataArray>(initializer)) {
if (array_initializer->isString()) {
Modified: lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Fri Dec 14 16:15:33 2018
@@ -776,10 +776,7 @@ bool EmulateInstructionARM::WriteBits32U
uint32_t random_data = rand();
const uint32_t addr_byte_size = GetAddressByteSize();
- if (!MemAWrite(context, address, random_data, addr_byte_size))
- return false;
-
- return true;
+ return MemAWrite(context, address, random_data, addr_byte_size);
}
// Write "bits (32) UNKNOWN" to register n. Helper function for many ARM
@@ -3340,10 +3337,7 @@ bool EmulateInstructionARM::EmulateCMNIm
EmulateInstruction::Context context;
context.type = EmulateInstruction::eContextImmediate;
context.SetNoArgs();
- if (!WriteFlags(context, res.result, res.carry_out, res.overflow))
- return false;
-
- return true;
+ return WriteFlags(context, res.result, res.carry_out, res.overflow);
}
// Compare Negative (register) adds a register value and an optionally-shifted
@@ -3410,10 +3404,7 @@ bool EmulateInstructionARM::EmulateCMNRe
EmulateInstruction::Context context;
context.type = EmulateInstruction::eContextImmediate;
context.SetNoArgs();
- if (!WriteFlags(context, res.result, res.carry_out, res.overflow))
- return false;
-
- return true;
+ return WriteFlags(context, res.result, res.carry_out, res.overflow);
}
// Compare (immediate) subtracts an immediate value from a register value. It
@@ -3463,10 +3454,7 @@ bool EmulateInstructionARM::EmulateCMPIm
EmulateInstruction::Context context;
context.type = EmulateInstruction::eContextImmediate;
context.SetNoArgs();
- if (!WriteFlags(context, res.result, res.carry_out, res.overflow))
- return false;
-
- return true;
+ return WriteFlags(context, res.result, res.carry_out, res.overflow);
}
// Compare (register) subtracts an optionally-shifted register value from a
@@ -3542,10 +3530,7 @@ bool EmulateInstructionARM::EmulateCMPRe
EmulateInstruction::Context context;
context.type = EmulateInstruction::eContextImmediate;
context.SetNoArgs();
- if (!WriteFlags(context, res.result, res.carry_out, res.overflow))
- return false;
-
- return true;
+ return WriteFlags(context, res.result, res.carry_out, res.overflow);
}
// Arithmetic Shift Right (immediate) shifts a register value right by an
@@ -9245,11 +9230,8 @@ bool EmulateInstructionARM::EmulateRSBIm
context.type = EmulateInstruction::eContextImmediate;
context.SetNoArgs();
- if (!WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
- res.carry_out, res.overflow))
- return false;
-
- return true;
+ return WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
+ res.carry_out, res.overflow);
}
// Reverse Subtract (register) subtracts a register value from an optionally-
@@ -9326,11 +9308,8 @@ bool EmulateInstructionARM::EmulateRSBRe
EmulateInstruction::Context context;
context.type = EmulateInstruction::eContextImmediate;
context.SetNoArgs();
- if (!WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
- res.carry_out, res.overflow))
- return false;
-
- return true;
+ return WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
+ res.carry_out, res.overflow);
}
// Reverse Subtract with Carry (immediate) subtracts a register value and the
@@ -9388,11 +9367,8 @@ bool EmulateInstructionARM::EmulateRSCIm
context.type = EmulateInstruction::eContextImmediate;
context.SetNoArgs();
- if (!WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
- res.carry_out, res.overflow))
- return false;
-
- return true;
+ return WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
+ res.carry_out, res.overflow);
}
// Reverse Subtract with Carry (register) subtracts a register value and the
@@ -9460,11 +9436,8 @@ bool EmulateInstructionARM::EmulateRSCRe
EmulateInstruction::Context context;
context.type = EmulateInstruction::eContextImmediate;
context.SetNoArgs();
- if (!WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
- res.carry_out, res.overflow))
- return false;
-
- return true;
+ return WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
+ res.carry_out, res.overflow);
}
// Subtract with Carry (immediate) subtracts an immediate value and the value
@@ -9531,11 +9504,8 @@ bool EmulateInstructionARM::EmulateSBCIm
context.type = EmulateInstruction::eContextImmediate;
context.SetNoArgs();
- if (!WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
- res.carry_out, res.overflow))
- return false;
-
- return true;
+ return WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
+ res.carry_out, res.overflow);
}
// Subtract with Carry (register) subtracts an optionally-shifted register
@@ -9620,11 +9590,8 @@ bool EmulateInstructionARM::EmulateSBCRe
EmulateInstruction::Context context;
context.type = EmulateInstruction::eContextImmediate;
context.SetNoArgs();
- if (!WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
- res.carry_out, res.overflow))
- return false;
-
- return true;
+ return WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
+ res.carry_out, res.overflow);
}
// This instruction subtracts an immediate value from a register value, and
@@ -9713,11 +9680,8 @@ bool EmulateInstructionARM::EmulateSUBIm
context.type = EmulateInstruction::eContextImmediate;
context.SetNoArgs();
- if (!WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
- res.carry_out, res.overflow))
- return false;
-
- return true;
+ return WriteCoreRegOptionalFlags(context, res.result, Rd, setflags,
+ res.carry_out, res.overflow);
}
// This instruction subtracts an immediate value from a register value, and
@@ -14153,11 +14117,8 @@ bool EmulateInstructionARM::BranchWriteP
else
target = addr & 0xfffffffe;
- if (!WriteRegisterUnsigned(context, eRegisterKindGeneric,
- LLDB_REGNUM_GENERIC_PC, target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindGeneric,
+ LLDB_REGNUM_GENERIC_PC, target);
}
// As a side effect, BXWritePC sets context.arg2 to eModeARM or eModeThumb by
@@ -14191,11 +14152,8 @@ bool EmulateInstructionARM::BXWritePC(Co
LLDB_REGNUM_GENERIC_FLAGS, m_new_inst_cpsr))
return false;
}
- if (!WriteRegisterUnsigned(context, eRegisterKindGeneric,
- LLDB_REGNUM_GENERIC_PC, target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindGeneric,
+ LLDB_REGNUM_GENERIC_PC, target);
}
// Dispatches to either BXWritePC or BranchWritePC based on architecture
@@ -14408,14 +14366,14 @@ bool EmulateInstructionARM::EvaluateInst
evaluate_options & eEmulateInstructionOptionIgnoreConditions;
bool success = false;
- if (m_opcode_cpsr == 0 || m_ignore_conditions == false) {
+ if (m_opcode_cpsr == 0 || !m_ignore_conditions) {
m_opcode_cpsr =
ReadRegisterUnsigned(eRegisterKindDWARF, dwarf_cpsr, 0, &success);
}
// Only return false if we are unable to read the CPSR if we care about
// conditions
- if (success == false && m_ignore_conditions == false)
+ if (!success && !m_ignore_conditions)
return false;
uint32_t orig_pc_value = 0;
Modified: lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp Fri Dec 14 16:15:33 2018
@@ -436,7 +436,7 @@ bool EmulateInstructionARM64::EvaluateIn
// Only return false if we are unable to read the CPSR if we care about
// conditions
- if (success == false && m_ignore_conditions == false)
+ if (!success && !m_ignore_conditions)
return false;
uint32_t orig_pc_value = 0;
@@ -546,11 +546,8 @@ bool EmulateInstructionARM64::BranchTo(c
} else
return false;
- if (!WriteRegisterUnsigned(context, eRegisterKindGeneric,
- LLDB_REGNUM_GENERIC_PC, addr))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindGeneric,
+ LLDB_REGNUM_GENERIC_PC, addr);
}
bool EmulateInstructionARM64::ConditionHolds(const uint32_t cond) {
@@ -1096,9 +1093,7 @@ bool EmulateInstructionARM64::EmulateB(c
return false;
}
- if (!BranchTo(context, 64, target))
- return false;
- return true;
+ return BranchTo(context, 64, target);
}
bool EmulateInstructionARM64::EmulateBcond(const uint32_t opcode) {
Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Fri Dec 14 16:15:33 2018
@@ -220,10 +220,8 @@ EmulateInstructionMIPS::CreateInstance(c
}
bool EmulateInstructionMIPS::SetTargetTriple(const ArchSpec &arch) {
- if (arch.GetTriple().getArch() == llvm::Triple::mips ||
- arch.GetTriple().getArch() == llvm::Triple::mipsel)
- return true;
- return false;
+ return arch.GetTriple().getArch() == llvm::Triple::mips ||
+ arch.GetTriple().getArch() == llvm::Triple::mipsel;
}
const char *EmulateInstructionMIPS::GetRegisterName(unsigned reg_num,
@@ -1350,10 +1348,7 @@ bool EmulateInstructionMIPS::Emulate_LW(
context.type = eContextPopRegisterOffStack;
context.SetAddress(address);
- if (!WriteRegister(context, ®_info_src, data_src))
- return false;
-
- return true;
+ return WriteRegister(context, ®_info_src, data_src);
}
return false;
@@ -1450,11 +1445,8 @@ bool EmulateInstructionMIPS::Emulate_LUI
context.SetImmediateSigned(imm);
context.type = eContextImmediate;
- if (WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_zero_mips + rt,
- imm))
- return true;
-
- return false;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF,
+ dwarf_zero_mips + rt, imm);
}
bool EmulateInstructionMIPS::Emulate_ADDIUSP(llvm::MCInst &insn) {
@@ -1697,10 +1689,7 @@ bool EmulateInstructionMIPS::Emulate_LWS
context.type = eContextPopRegisterOffStack;
context.SetAddress(base_address);
- if (!WriteRegister(context, ®_info_src, data_src))
- return false;
-
- return true;
+ return WriteRegister(context, ®_info_src, data_src);
}
return false;
@@ -1807,11 +1796,8 @@ bool EmulateInstructionMIPS::Emulate_JRA
context.type = eContextAdjustStackPointer;
// update SP
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_sp_mips,
- result))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_sp_mips,
+ result);
}
static int IsAdd64bitOverflow(int32_t a, int32_t b) {
@@ -1864,11 +1850,8 @@ bool EmulateInstructionMIPS::Emulate_BXX
context.type = eContextRelativeBranchImmediate;
context.SetImmediate(offset);
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
/*
@@ -1947,11 +1930,8 @@ bool EmulateInstructionMIPS::Emulate_BXX
context.type = eContextRelativeBranchImmediate;
context.SetImmediate(current_inst_size + offset);
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
/*
@@ -2122,11 +2102,8 @@ bool EmulateInstructionMIPS::Emulate_BXX
context.type = eContextRelativeBranchImmediate;
context.SetImmediate(offset);
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
/*
@@ -2189,11 +2166,8 @@ bool EmulateInstructionMIPS::Emulate_BXX
context.type = eContextRelativeBranchImmediate;
context.SetImmediate(current_inst_size + offset);
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
bool EmulateInstructionMIPS::Emulate_B16_MM(llvm::MCInst &insn) {
@@ -2214,11 +2188,8 @@ bool EmulateInstructionMIPS::Emulate_B16
context.type = eContextRelativeBranchImmediate;
context.SetImmediate(current_inst_size + offset);
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
/*
@@ -2529,11 +2500,8 @@ bool EmulateInstructionMIPS::Emulate_BC(
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
bool EmulateInstructionMIPS::Emulate_J(llvm::MCInst &insn) {
@@ -2556,10 +2524,7 @@ bool EmulateInstructionMIPS::Emulate_J(l
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips, pc))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips, pc);
}
bool EmulateInstructionMIPS::Emulate_JAL(llvm::MCInst &insn) {
@@ -2688,11 +2653,8 @@ bool EmulateInstructionMIPS::Emulate_JIC
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
bool EmulateInstructionMIPS::Emulate_JR(llvm::MCInst &insn) {
@@ -2713,11 +2675,8 @@ bool EmulateInstructionMIPS::Emulate_JR(
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- rs_val))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ rs_val);
}
/*
@@ -2758,11 +2717,8 @@ bool EmulateInstructionMIPS::Emulate_FP_
}
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
bool EmulateInstructionMIPS::Emulate_BC1EQZ(llvm::MCInst &insn) {
@@ -2797,11 +2753,8 @@ bool EmulateInstructionMIPS::Emulate_BC1
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
bool EmulateInstructionMIPS::Emulate_BC1NEZ(llvm::MCInst &insn) {
@@ -2836,11 +2789,8 @@ bool EmulateInstructionMIPS::Emulate_BC1
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
/*
@@ -2898,11 +2848,8 @@ bool EmulateInstructionMIPS::Emulate_3D_
}
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
bool EmulateInstructionMIPS::Emulate_BNZB(llvm::MCInst &insn) {
@@ -2993,11 +2940,8 @@ bool EmulateInstructionMIPS::Emulate_MSA
Context context;
context.type = eContextRelativeBranchImmediate;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
bool EmulateInstructionMIPS::Emulate_BNZV(llvm::MCInst &insn) {
@@ -3039,11 +2983,8 @@ bool EmulateInstructionMIPS::Emulate_MSA
Context context;
context.type = eContextRelativeBranchImmediate;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips,
+ target);
}
bool EmulateInstructionMIPS::Emulate_LDST_Imm(llvm::MCInst &insn) {
Modified: lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp Fri Dec 14 16:15:33 2018
@@ -207,10 +207,8 @@ EmulateInstructionMIPS64::CreateInstance
}
bool EmulateInstructionMIPS64::SetTargetTriple(const ArchSpec &arch) {
- if (arch.GetTriple().getArch() == llvm::Triple::mips64 ||
- arch.GetTriple().getArch() == llvm::Triple::mips64el)
- return true;
- return false;
+ return arch.GetTriple().getArch() == llvm::Triple::mips64 ||
+ arch.GetTriple().getArch() == llvm::Triple::mips64el;
}
const char *EmulateInstructionMIPS64::GetRegisterName(unsigned reg_num,
@@ -1240,10 +1238,7 @@ bool EmulateInstructionMIPS64::Emulate_L
Context context;
context.type = eContextRegisterLoad;
- if (!WriteRegister(context, ®_info_src, data_src))
- return false;
-
- return true;
+ return WriteRegister(context, ®_info_src, data_src);
}
return false;
@@ -1262,11 +1257,8 @@ bool EmulateInstructionMIPS64::Emulate_L
context.SetImmediateSigned(imm);
context.type = eContextImmediate;
- if (WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_zero_mips64 + rt,
- imm))
- return true;
-
- return false;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF,
+ dwarf_zero_mips64 + rt, imm);
}
bool EmulateInstructionMIPS64::Emulate_DSUBU_DADDU(llvm::MCInst &insn) {
@@ -1394,11 +1386,8 @@ bool EmulateInstructionMIPS64::Emulate_B
context.type = eContextRelativeBranchImmediate;
context.SetImmediate(offset);
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
/*
@@ -1633,11 +1622,8 @@ bool EmulateInstructionMIPS64::Emulate_B
context.type = eContextRelativeBranchImmediate;
context.SetImmediate(offset);
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
bool EmulateInstructionMIPS64::Emulate_BC(llvm::MCInst &insn) {
@@ -1659,11 +1645,8 @@ bool EmulateInstructionMIPS64::Emulate_B
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
static int IsAdd64bitOverflow(int64_t a, int64_t b) {
@@ -1747,11 +1730,8 @@ bool EmulateInstructionMIPS64::Emulate_B
context.type = eContextRelativeBranchImmediate;
context.SetImmediate(current_inst_size + offset);
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
/*
@@ -1814,11 +1794,8 @@ bool EmulateInstructionMIPS64::Emulate_B
context.type = eContextRelativeBranchImmediate;
context.SetImmediate(current_inst_size + offset);
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
bool EmulateInstructionMIPS64::Emulate_J(llvm::MCInst &insn) {
@@ -1841,10 +1818,8 @@ bool EmulateInstructionMIPS64::Emulate_J
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64, pc))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ pc);
}
bool EmulateInstructionMIPS64::Emulate_JAL(llvm::MCInst &insn) {
@@ -1973,11 +1948,8 @@ bool EmulateInstructionMIPS64::Emulate_J
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
bool EmulateInstructionMIPS64::Emulate_JR(llvm::MCInst &insn) {
@@ -1998,11 +1970,8 @@ bool EmulateInstructionMIPS64::Emulate_J
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- rs_val))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ rs_val);
}
/*
@@ -2052,11 +2021,8 @@ bool EmulateInstructionMIPS64::Emulate_F
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
bool EmulateInstructionMIPS64::Emulate_BC1EQZ(llvm::MCInst &insn) {
@@ -2091,11 +2057,8 @@ bool EmulateInstructionMIPS64::Emulate_B
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
bool EmulateInstructionMIPS64::Emulate_BC1NEZ(llvm::MCInst &insn) {
@@ -2130,11 +2093,8 @@ bool EmulateInstructionMIPS64::Emulate_B
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
/*
@@ -2193,11 +2153,8 @@ bool EmulateInstructionMIPS64::Emulate_3
Context context;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
bool EmulateInstructionMIPS64::Emulate_BNZB(llvm::MCInst &insn) {
@@ -2288,11 +2245,8 @@ bool EmulateInstructionMIPS64::Emulate_M
Context context;
context.type = eContextRelativeBranchImmediate;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
bool EmulateInstructionMIPS64::Emulate_BNZV(llvm::MCInst &insn) {
@@ -2334,11 +2288,8 @@ bool EmulateInstructionMIPS64::Emulate_M
Context context;
context.type = eContextRelativeBranchImmediate;
- if (!WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
- target))
- return false;
-
- return true;
+ return WriteRegisterUnsigned(context, eRegisterKindDWARF, dwarf_pc_mips64,
+ target);
}
bool EmulateInstructionMIPS64::Emulate_LDST_Imm(llvm::MCInst &insn) {
Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp Fri Dec 14 16:15:33 2018
@@ -141,10 +141,7 @@ static bool IsTrivialBasename(const llvm
}
// We processed all characters. It is a vaild basename.
- if (idx == basename.size())
- return true;
-
- return false;
+ return idx == basename.size();
}
bool CPlusPlusLanguage::MethodName::TrySimplifiedParse() {
Modified: lldb/trunk/source/Plugins/Language/ObjC/CF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/CF.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/CF.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/CF.cpp Fri Dec 14 16:15:33 2018
@@ -149,7 +149,7 @@ bool lldb_private::formatters::CFBitVect
}
}
- if (is_type_ok == false)
+ if (!is_type_ok)
return false;
Status error;
Modified: lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp Fri Dec 14 16:15:33 2018
@@ -144,11 +144,8 @@ public:
m_userinfo_sp.reset();
m_reserved_sp.reset();
- if (!ExtractFields(m_backend, &m_name_sp, &m_reason_sp, &m_userinfo_sp,
- &m_reserved_sp)) {
- return false;
- }
- return true;
+ return ExtractFields(m_backend, &m_name_sp, &m_reason_sp, &m_userinfo_sp,
+ &m_reserved_sp);
}
bool MightHaveChildren() override { return true; }
Modified: lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp Fri Dec 14 16:15:33 2018
@@ -126,11 +126,7 @@ public:
return false;
}
- bool MightHaveChildren() override {
- if (m_impl.m_mode == Mode::Invalid)
- return false;
- return true;
- }
+ bool MightHaveChildren() override { return m_impl.m_mode != Mode::Invalid; }
size_t GetIndexOfChildWithName(const ConstString &name) override {
const char *item_name = name.GetCString();
Modified: lldb/trunk/source/Plugins/Language/ObjC/NSString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSString.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSString.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSString.cpp Fri Dec 14 16:15:33 2018
@@ -225,10 +225,10 @@ bool lldb_private::formatters::NSStringS
options.SetStream(&stream);
options.SetQuote('"');
options.SetSourceSize(explicit_length);
- options.SetNeedsZeroTermination(has_explicit_length == false);
+ options.SetNeedsZeroTermination(!has_explicit_length);
options.SetIgnoreMaxLength(summary_options.GetCapping() ==
TypeSummaryCapping::eTypeSummaryUncapped);
- options.SetBinaryZeroIsTerminator(has_explicit_length == false);
+ options.SetBinaryZeroIsTerminator(!has_explicit_length);
options.SetLanguage(summary_options.GetLanguage());
return StringPrinter::ReadStringAndDumpToStream<
StringPrinter::StringElementType::UTF16>(options);
@@ -245,10 +245,10 @@ bool lldb_private::formatters::NSStringS
options.SetStream(&stream);
options.SetQuote('"');
options.SetSourceSize(explicit_length);
- options.SetNeedsZeroTermination(has_explicit_length == false);
+ options.SetNeedsZeroTermination(!has_explicit_length);
options.SetIgnoreMaxLength(summary_options.GetCapping() ==
TypeSummaryCapping::eTypeSummaryUncapped);
- options.SetBinaryZeroIsTerminator(has_explicit_length == false);
+ options.SetBinaryZeroIsTerminator(!has_explicit_length);
options.SetLanguage(summary_options.GetLanguage());
return StringPrinter::ReadStringAndDumpToStream<
StringPrinter::StringElementType::UTF16>(options);
@@ -260,10 +260,7 @@ bool lldb_private::formatters::NSStringS
Status error;
explicit_length =
process_sp->ReadUnsignedIntegerFromMemory(location, 1, 0, error);
- if (error.Fail() || explicit_length == 0)
- has_explicit_length = false;
- else
- has_explicit_length = true;
+ has_explicit_length = !(error.Fail() || explicit_length == 0);
location++;
}
options.SetLocation(location);
Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp Fri Dec 14 16:15:33 2018
@@ -309,10 +309,7 @@ bool ItaniumABILanguageRuntime::IsVTable
return false;
// Can we maybe ask Clang about this?
- if (strstr(name, "_vptr$") == name)
- return true;
- else
- return false;
+ return strstr(name, "_vptr$") == name;
}
//------------------------------------------------------------------
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp Fri Dec 14 16:15:33 2018
@@ -264,11 +264,7 @@ bool ClassDescriptorV2::method_t::Read(P
}
process->ReadCStringFromMemory(m_types_ptr, m_types, error);
- if (error.Fail()) {
- return false;
- }
-
- return true;
+ return !error.Fail();
}
bool ClassDescriptorV2::ivar_list_t::Read(Process *process, lldb::addr_t addr) {
@@ -323,11 +319,7 @@ bool ClassDescriptorV2::ivar_t::Read(Pro
}
process->ReadCStringFromMemory(m_type_ptr, m_type, error);
- if (error.Fail()) {
- return false;
- }
-
- return true;
+ return !error.Fail();
}
bool ClassDescriptorV2::Describe(
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp Fri Dec 14 16:15:33 2018
@@ -441,13 +441,10 @@ bool AppleObjCRuntime::CalculateHasNewLi
SymbolContextList sc_list;
- if (target.GetImages().FindSymbolsWithNameAndType(s_method_signature,
- eSymbolTypeCode, sc_list) ||
- target.GetImages().FindSymbolsWithNameAndType(s_arclite_method_signature,
- eSymbolTypeCode, sc_list))
- return true;
- else
- return false;
+ return target.GetImages().FindSymbolsWithNameAndType(
+ s_method_signature, eSymbolTypeCode, sc_list) ||
+ target.GetImages().FindSymbolsWithNameAndType(
+ s_arclite_method_signature, eSymbolTypeCode, sc_list);
}
lldb::SearchFilterSP AppleObjCRuntime::CreateExceptionSearchFilter() {
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp Fri Dec 14 16:15:33 2018
@@ -58,7 +58,7 @@ bool AppleObjCRuntimeV1::GetDynamicTypeA
class_type_or_name.SetName(class_descriptor->GetClassName());
}
}
- return class_type_or_name.IsEmpty() == false;
+ return !class_type_or_name.IsEmpty();
}
//------------------------------------------------------------------
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Fri Dec 14 16:15:33 2018
@@ -454,7 +454,7 @@ bool AppleObjCRuntimeV2::GetDynamicTypeA
}
}
}
- return class_type_or_name.IsEmpty() == false;
+ return !class_type_or_name.IsEmpty();
}
//------------------------------------------------------------------
@@ -1852,8 +1852,8 @@ void AppleObjCRuntimeV2::UpdateISAToDesc
// warn if:
// - we could not run either expression
// - we found fewer than num_classes_to_warn_at classes total
- if ((false == shared_cache_update_result.m_update_ran) ||
- (false == dynamic_update_result.m_update_ran))
+ if ((!shared_cache_update_result.m_update_ran) ||
+ (!dynamic_update_result.m_update_ran))
WarnIfNoClassesCached(
SharedCacheWarningReason::eExpressionExecutionFailure);
else if (dynamic_update_result.m_num_found +
@@ -2428,7 +2428,7 @@ AppleObjCRuntimeV2::NonPointerISACache::
ObjCLanguageRuntime::ClassDescriptorSP
AppleObjCRuntimeV2::NonPointerISACache::GetClassDescriptor(ObjCISA isa) {
ObjCISA real_isa = 0;
- if (EvaluateNonPointerISA(isa, real_isa) == false)
+ if (!EvaluateNonPointerISA(isa, real_isa))
return ObjCLanguageRuntime::ClassDescriptorSP();
auto cache_iter = m_cache.find(real_isa);
if (cache_iter != m_cache.end())
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp Fri Dec 14 16:15:33 2018
@@ -200,10 +200,7 @@ bool AppleThreadPlanStepThroughObjCTramp
// The base class MischiefManaged does some cleanup - so you have to call it in
// your MischiefManaged derived class.
bool AppleThreadPlanStepThroughObjCTrampoline::MischiefManaged() {
- if (IsPlanComplete())
- return true;
- else
- return false;
+ return IsPlanComplete();
}
bool AppleThreadPlanStepThroughObjCTrampoline::WillStop() { return true; }
Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Fri Dec 14 16:15:33 2018
@@ -2074,10 +2074,8 @@ bool RenderScriptRuntime::JITElementPack
// If this Element has subelements then JIT rsaElementGetSubElements() for
// details about its fields
- if (*elem.field_count.get() > 0 && !JITSubelements(elem, context, frame_ptr))
- return false;
-
- return true;
+ return !(*elem.field_count.get() > 0 &&
+ !JITSubelements(elem, context, frame_ptr));
}
// JITs the RS runtime for information about the subelements/fields of a struct
@@ -2300,10 +2298,7 @@ bool RenderScriptRuntime::RefreshAllocat
SetElementSize(alloc->element);
// Use GetOffsetPointer() to infer size of the allocation
- if (!JITAllocationSize(alloc, frame_ptr))
- return false;
-
- return true;
+ return JITAllocationSize(alloc, frame_ptr);
}
// Function attempts to set the type_name member of the paramaterised Element
Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp Fri Dec 14 16:15:33 2018
@@ -207,7 +207,7 @@ ObjectContainerBSDArchive::Archive::Find
while (pos != archive_map.end() && pos->first == file) {
bool match = true;
if (arch.IsValid() &&
- pos->second->GetArchitecture().IsCompatibleMatch(arch) == false)
+ !pos->second->GetArchitecture().IsCompatibleMatch(arch))
match = false;
else if (file_offset != LLDB_INVALID_OFFSET &&
pos->second->GetFileOffset() != file_offset)
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp Fri Dec 14 16:15:33 2018
@@ -38,7 +38,7 @@ static bool GetMaxU64(const lldb_private
lldb::offset_t saved_offset = *offset;
for (uint32_t i = 0; i < count; ++i, ++value) {
- if (GetMaxU64(data, offset, value, byte_size) == false) {
+ if (!GetMaxU64(data, offset, value, byte_size)) {
*offset = saved_offset;
return false;
}
@@ -60,7 +60,7 @@ static bool GetMaxS64(const lldb_private
lldb::offset_t saved_offset = *offset;
for (uint32_t i = 0; i < count; ++i, ++value) {
- if (GetMaxS64(data, offset, value, byte_size) == false) {
+ if (!GetMaxS64(data, offset, value, byte_size)) {
*offset = saved_offset;
return false;
}
@@ -133,7 +133,7 @@ bool ELFHeader::Parse(lldb_private::Data
return false;
// Read e_entry, e_phoff and e_shoff.
- if (GetMaxU64(data, offset, &e_entry, byte_size, 3) == false)
+ if (!GetMaxU64(data, offset, &e_entry, byte_size, 3))
return false;
// Read e_flags.
@@ -232,11 +232,11 @@ bool ELFSectionHeader::Parse(const lldb_
return false;
// Read sh_flags.
- if (GetMaxU64(data, offset, &sh_flags, byte_size) == false)
+ if (!GetMaxU64(data, offset, &sh_flags, byte_size))
return false;
// Read sh_addr, sh_off and sh_size.
- if (GetMaxU64(data, offset, &sh_addr, byte_size, 3) == false)
+ if (!GetMaxU64(data, offset, &sh_addr, byte_size, 3))
return false;
// Read sh_link and sh_info.
@@ -244,7 +244,7 @@ bool ELFSectionHeader::Parse(const lldb_
return false;
// Read sh_addralign and sh_entsize.
- if (GetMaxU64(data, offset, &sh_addralign, byte_size, 2) == false)
+ if (!GetMaxU64(data, offset, &sh_addralign, byte_size, 2))
return false;
return true;
@@ -332,7 +332,7 @@ bool ELFSymbol::Parse(const lldb_private
if (parsing_32) {
// Read st_value and st_size.
- if (GetMaxU64(data, offset, &st_value, byte_size, 2) == false)
+ if (!GetMaxU64(data, offset, &st_value, byte_size, 2))
return false;
// Read st_info and st_other.
@@ -376,7 +376,7 @@ bool ELFProgramHeader::Parse(const lldb_
if (parsing_32) {
// Read p_offset, p_vaddr, p_paddr, p_filesz and p_memsz.
- if (GetMaxU64(data, offset, &p_offset, byte_size, 5) == false)
+ if (!GetMaxU64(data, offset, &p_offset, byte_size, 5))
return false;
// Read p_flags.
@@ -384,7 +384,7 @@ bool ELFProgramHeader::Parse(const lldb_
return false;
// Read p_align.
- if (GetMaxU64(data, offset, &p_align, byte_size) == false)
+ if (!GetMaxU64(data, offset, &p_align, byte_size))
return false;
} else {
// Read p_flags.
@@ -392,7 +392,7 @@ bool ELFProgramHeader::Parse(const lldb_
return false;
// Read p_offset, p_vaddr, p_paddr, p_filesz, p_memsz and p_align.
- if (GetMaxU64(data, offset, &p_offset, byte_size, 6) == false)
+ if (!GetMaxU64(data, offset, &p_offset, byte_size, 6))
return false;
}
@@ -420,10 +420,7 @@ bool ELFRel::Parse(const lldb_private::D
const unsigned byte_size = data.GetAddressByteSize();
// Read r_offset and r_info.
- if (GetMaxU64(data, offset, &r_offset, byte_size, 2) == false)
- return false;
-
- return true;
+ return GetMaxU64(data, offset, &r_offset, byte_size, 2) != false;
}
//------------------------------------------------------------------------------
@@ -436,11 +433,11 @@ bool ELFRela::Parse(const lldb_private::
const unsigned byte_size = data.GetAddressByteSize();
// Read r_offset and r_info.
- if (GetMaxU64(data, offset, &r_offset, byte_size, 2) == false)
+ if (!GetMaxU64(data, offset, &r_offset, byte_size, 2))
return false;
// Read r_addend;
- if (GetMaxS64(data, offset, &r_addend, byte_size) == false)
+ if (!GetMaxS64(data, offset, &r_addend, byte_size))
return false;
return true;
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Fri Dec 14 16:15:33 2018
@@ -1140,7 +1140,7 @@ size_t ObjectFileELF::GetProgramHeaderIn
uint32_t idx;
lldb::offset_t offset;
for (idx = 0, offset = 0; idx < header.e_phnum; ++idx) {
- if (program_headers[idx].Parse(data, &offset) == false)
+ if (!program_headers[idx].Parse(data, &offset))
break;
}
@@ -1552,7 +1552,7 @@ size_t ObjectFileELF::GetSectionHeaderIn
uint32_t idx;
lldb::offset_t offset;
for (idx = 0, offset = 0; idx < header.e_shnum; ++idx) {
- if (section_headers[idx].Parse(sh_data, &offset) == false)
+ if (!section_headers[idx].Parse(sh_data, &offset))
break;
}
if (idx < section_headers.size())
@@ -1953,7 +1953,7 @@ unsigned ObjectFileELF::ParseSymbols(Sym
unsigned i;
for (i = 0; i < num_symbols; ++i) {
- if (symbol.Parse(symtab_data, &offset) == false)
+ if (!symbol.Parse(symtab_data, &offset))
break;
const char *symbol_name = strtab_data.PeekCStr(symbol.st_name);
@@ -2419,7 +2419,7 @@ static unsigned ParsePLTRelocations(
unsigned slot_type = hdr->GetRelocationJumpSlotType();
unsigned i;
for (i = 0; i < num_relocations; ++i) {
- if (rel.Parse(rel_data, &offset) == false)
+ if (!rel.Parse(rel_data, &offset))
break;
if (reloc_type(rel) != slot_type)
@@ -2552,7 +2552,7 @@ unsigned ObjectFileELF::ApplyRelocations
}
for (unsigned i = 0; i < num_relocations; ++i) {
- if (rel.Parse(rel_data, &offset) == false)
+ if (!rel.Parse(rel_data, &offset))
break;
Symbol *symbol = NULL;
Modified: lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp Fri Dec 14 16:15:33 2018
@@ -218,7 +218,7 @@ bool ObjectFileJIT::SetLoadAddress(Targe
// that size on disk (to avoid __PAGEZERO) and load them
SectionSP section_sp(section_list->GetSectionAtIndex(sect_idx));
if (section_sp && section_sp->GetFileSize() > 0 &&
- section_sp->IsThreadSpecific() == false) {
+ !section_sp->IsThreadSpecific()) {
if (target.GetSectionLoadList().SetSectionLoadAddress(
section_sp, section_sp->GetFileAddress() + value))
++num_loaded_sections;
Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Fri Dec 14 16:15:33 2018
@@ -4469,7 +4469,7 @@ size_t ObjectFileMachO::ParseSymtab() {
symbol_value -= section_file_addr;
}
- if (is_debug == false) {
+ if (!is_debug) {
if (type == eSymbolTypeCode) {
// See if we can find a N_FUN entry for any code symbols. If we
// do find a match, and the name matches, then we can merge the
@@ -4616,7 +4616,7 @@ size_t ObjectFileMachO::ParseSymtab() {
if (function_starts_count > 0) {
uint32_t num_synthetic_function_symbols = 0;
for (i = 0; i < function_starts_count; ++i) {
- if (function_starts.GetEntryRef(i).data == false)
+ if (!function_starts.GetEntryRef(i).data)
++num_synthetic_function_symbols;
}
@@ -4628,7 +4628,7 @@ size_t ObjectFileMachO::ParseSymtab() {
for (i = 0; i < function_starts_count; ++i) {
const FunctionStarts::Entry *func_start_entry =
function_starts.GetEntryAtIndex(i);
- if (func_start_entry->data == false) {
+ if (!func_start_entry->data) {
addr_t symbol_file_addr = func_start_entry->addr;
uint32_t symbol_flags = 0;
if (is_arm) {
@@ -5861,7 +5861,7 @@ uint32_t ObjectFileMachO::GetSDKVersion(
if (m_sdk_versions.empty()) {
lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic);
bool success = false;
- for (uint32_t i = 0; success == false && i < m_header.ncmds; ++i) {
+ for (uint32_t i = 0; !success && i < m_header.ncmds; ++i) {
const lldb::offset_t load_cmd_offset = offset;
version_min_command lc;
@@ -5890,47 +5890,46 @@ uint32_t ObjectFileMachO::GetSDKVersion(
offset = load_cmd_offset + lc.cmdsize;
}
- if (success == false)
- {
- offset = MachHeaderSizeFromMagic(m_header.magic);
- for (uint32_t i = 0; success == false && i < m_header.ncmds; ++i)
- {
- const lldb::offset_t load_cmd_offset = offset;
-
- version_min_command lc;
- if (m_data.GetU32(&offset, &lc.cmd, 2) == NULL)
- break;
- if (lc.cmd == llvm::MachO::LC_BUILD_VERSION)
- {
- // struct build_version_command {
- // uint32_t cmd; /* LC_BUILD_VERSION */
- // uint32_t cmdsize; /* sizeof(struct build_version_command) plus */
- // /* ntools * sizeof(struct build_tool_version) */
- // uint32_t platform; /* platform */
- // uint32_t minos; /* X.Y.Z is encoded in nibbles xxxx.yy.zz */
- // uint32_t sdk; /* X.Y.Z is encoded in nibbles xxxx.yy.zz */
- // uint32_t ntools; /* number of tool entries following this */
- // };
-
- offset += 4; // skip platform
- uint32_t minos = m_data.GetU32(&offset);
-
- const uint32_t xxxx = minos >> 16;
- const uint32_t yy = (minos >> 8) & 0xffu;
- const uint32_t zz = minos & 0xffu;
- if (xxxx)
- {
- m_sdk_versions.push_back (xxxx);
- m_sdk_versions.push_back (yy);
- m_sdk_versions.push_back (zz);
- success = true;
- }
- }
- offset = load_cmd_offset + lc.cmdsize;
+ if (!success) {
+ offset = MachHeaderSizeFromMagic(m_header.magic);
+ for (uint32_t i = 0; !success && i < m_header.ncmds; ++i) {
+ const lldb::offset_t load_cmd_offset = offset;
+
+ version_min_command lc;
+ if (m_data.GetU32(&offset, &lc.cmd, 2) == NULL)
+ break;
+ if (lc.cmd == llvm::MachO::LC_BUILD_VERSION) {
+ // struct build_version_command {
+ // uint32_t cmd; /* LC_BUILD_VERSION */
+ // uint32_t cmdsize; /* sizeof(struct
+ // build_version_command) plus */
+ // /* ntools * sizeof(struct
+ // build_tool_version) */
+ // uint32_t platform; /* platform */
+ // uint32_t minos; /* X.Y.Z is encoded in nibbles
+ // xxxx.yy.zz */ uint32_t sdk; /* X.Y.Z is encoded
+ // in nibbles xxxx.yy.zz */ uint32_t ntools; /* number
+ // of tool entries following this */
+ // };
+
+ offset += 4; // skip platform
+ uint32_t minos = m_data.GetU32(&offset);
+
+ const uint32_t xxxx = minos >> 16;
+ const uint32_t yy = (minos >> 8) & 0xffu;
+ const uint32_t zz = minos & 0xffu;
+ if (xxxx) {
+ m_sdk_versions.push_back(xxxx);
+ m_sdk_versions.push_back(yy);
+ m_sdk_versions.push_back(zz);
+ success = true;
+ }
}
+ offset = load_cmd_offset + lc.cmdsize;
+ }
}
- if (success == false) {
+ if (!success) {
// Push an invalid value so we don't try to find
// the version # again on the next call to this
// method.
@@ -5991,8 +5990,7 @@ Section *ObjectFileMachO::GetMachHeaderS
++sect_idx) {
Section *section = section_list->GetSectionAtIndex(sect_idx).get();
if (section && section->GetFileSize() > 0 &&
- section->GetFileOffset() == 0 &&
- section->IsThreadSpecific() == false &&
+ section->GetFileOffset() == 0 && !section->IsThreadSpecific() &&
module_sp.get() == section->GetModule().get()) {
return section;
}
@@ -6011,7 +6009,7 @@ lldb::addr_t ObjectFileMachO::CalculateS
lldb::addr_t mach_header_file_addr = mach_header_section->GetFileAddress();
if (mach_header_file_addr != LLDB_INVALID_ADDRESS) {
if (section && section->GetFileSize() > 0 &&
- section->IsThreadSpecific() == false &&
+ !section->IsThreadSpecific() &&
module_sp.get() == section->GetModule().get()) {
// Ignore __LINKEDIT and __DWARF segments
if (section->GetName() == GetSegmentNameLINKEDIT()) {
@@ -6019,7 +6017,7 @@ lldb::addr_t ObjectFileMachO::CalculateS
// kernel binary like a kext or mach_kernel.
const bool is_memory_image = (bool)m_process_wp.lock();
const Strata strata = GetStrata();
- if (is_memory_image == false || strata == eStrataKernel)
+ if (!is_memory_image || strata == eStrataKernel)
return LLDB_INVALID_ADDRESS;
}
return section->GetFileAddress() - mach_header_file_addr +
@@ -6046,7 +6044,7 @@ bool ObjectFileMachO::SetLoadAddress(Tar
// sections that size on disk (to avoid __PAGEZERO) and load them
SectionSP section_sp(section_list->GetSectionAtIndex(sect_idx));
if (section_sp && section_sp->GetFileSize() > 0 &&
- section_sp->IsThreadSpecific() == false &&
+ !section_sp->IsThreadSpecific() &&
module_sp.get() == section_sp->GetModule().get()) {
// Ignore __LINKEDIT and __DWARF segments
if (section_sp->GetName() == GetSegmentNameLINKEDIT()) {
@@ -6054,7 +6052,7 @@ bool ObjectFileMachO::SetLoadAddress(Tar
// isn't a kernel binary like a kext or mach_kernel.
const bool is_memory_image = (bool)m_process_wp.lock();
const Strata strata = GetStrata();
- if (is_memory_image == false || strata == eStrataKernel)
+ if (!is_memory_image || strata == eStrataKernel)
continue;
}
if (target.GetSectionLoadList().SetSectionLoadAddress(
Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp Fri Dec 14 16:15:33 2018
@@ -527,7 +527,7 @@ bool ObjectFilePECOFF::ParseSectionHeade
}
}
- return m_sect_headers.empty() == false;
+ return !m_sect_headers.empty();
}
bool ObjectFilePECOFF::GetSectionName(std::string §_name,
Modified: lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp (original)
+++ lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp Fri Dec 14 16:15:33 2018
@@ -213,7 +213,7 @@ bool OperatingSystemPython::UpdateThread
// beginning of the list
uint32_t insert_idx = 0;
for (uint32_t core_idx = 0; core_idx < num_cores; ++core_idx) {
- if (core_used_map[core_idx] == false) {
+ if (!core_used_map[core_idx]) {
new_thread_list.InsertThread(
core_thread_list.GetThreadAtIndex(core_idx, false), insert_idx);
++insert_idx;
Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp Fri Dec 14 16:15:33 2018
@@ -74,7 +74,7 @@ PlatformSP PlatformAndroid::CreateInstan
}
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
const llvm::Triple &triple = arch->GetTriple();
switch (triple.getVendor()) {
case llvm::Triple::PC:
Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp Fri Dec 14 16:15:33 2018
@@ -48,7 +48,7 @@ PlatformSP PlatformFreeBSD::CreateInstan
arch ? arch->GetTriple().getTriple() : "<null>");
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
const llvm::Triple &triple = arch->GetTriple();
switch (triple.getOS()) {
case llvm::Triple::FreeBSD:
Modified: lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp Fri Dec 14 16:15:33 2018
@@ -30,7 +30,7 @@ static uint32_t g_initialize_count = 0;
PlatformSP PlatformKalimba::CreateInstance(bool force, const ArchSpec *arch) {
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
const llvm::Triple &triple = arch->GetTriple();
switch (triple.getVendor()) {
case llvm::Triple::CSR:
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Fri Dec 14 16:15:33 2018
@@ -46,7 +46,7 @@ PlatformSP PlatformLinux::CreateInstance
arch ? arch->GetTriple().getTriple() : "<null>");
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
const llvm::Triple &triple = arch->GetTriple();
switch (triple.getOS()) {
case llvm::Triple::Linux:
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp Fri Dec 14 16:15:33 2018
@@ -76,7 +76,7 @@ PlatformSP PlatformAppleTVSimulator::Cre
}
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
switch (arch->GetMachine()) {
case llvm::Triple::x86_64: {
const llvm::Triple &triple = arch->GetTriple();
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp Fri Dec 14 16:15:33 2018
@@ -75,7 +75,7 @@ PlatformSP PlatformAppleWatchSimulator::
}
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
switch (arch->GetMachine()) {
case llvm::Triple::x86_64: {
const llvm::Triple &triple = arch->GetTriple();
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Fri Dec 14 16:15:33 2018
@@ -489,10 +489,7 @@ bool PlatformDarwin::ModuleIsExcludedFor
return false;
ObjectFile::Type obj_type = obj_file->GetType();
- if (obj_type == ObjectFile::eTypeDynamicLinker)
- return true;
- else
- return false;
+ return obj_type == ObjectFile::eTypeDynamicLinker;
}
bool PlatformDarwin::x86GetSupportedArchitectureAtIndex(uint32_t idx,
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp Fri Dec 14 16:15:33 2018
@@ -91,7 +91,7 @@ PlatformSP PlatformDarwinKernel::CreateI
// ArchSpec for normal userland debugging. It is only useful in kernel debug
// sessions and the DynamicLoaderDarwinPlugin (or a user doing 'platform
// select') will force the creation of this Platform plugin.
- if (force == false) {
+ if (!force) {
if (log)
log->Printf("PlatformDarwinKernel::%s() aborting creation of platform "
"because force == false",
@@ -102,7 +102,7 @@ PlatformSP PlatformDarwinKernel::CreateI
bool create = force;
LazyBool is_ios_debug_session = eLazyBoolCalculate;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
const llvm::Triple &triple = arch->GetTriple();
switch (triple.getVendor()) {
case llvm::Triple::Apple:
@@ -640,10 +640,7 @@ bool PlatformDarwinKernel::KextHasdSYMSi
shallow_bundle_str += ".dSYM";
dsym_fspec.SetFile(shallow_bundle_str, FileSpec::Style::native);
FileSystem::Instance().Resolve(dsym_fspec);
- if (FileSystem::Instance().IsDirectory(dsym_fspec)) {
- return true;
- }
- return false;
+ return FileSystem::Instance().IsDirectory(dsym_fspec);
}
// Given a FileSpec of /dir/dir/mach.development.t7004 Return true if a dSYM
@@ -654,10 +651,7 @@ bool PlatformDarwinKernel::KernelHasdSYM
std::string filename = kernel_binary.GetFilename().AsCString();
filename += ".dSYM";
kernel_dsym.GetFilename() = ConstString(filename);
- if (FileSystem::Instance().IsDirectory(kernel_dsym)) {
- return true;
- }
- return false;
+ return FileSystem::Instance().IsDirectory(kernel_dsym);
}
Status PlatformDarwinKernel::GetSharedModule(
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp Fri Dec 14 16:15:33 2018
@@ -80,7 +80,7 @@ PlatformSP PlatformMacOSX::CreateInstanc
const bool is_host = false;
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
const llvm::Triple &triple = arch->GetTriple();
switch (triple.getVendor()) {
case llvm::Triple::Apple:
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp Fri Dec 14 16:15:33 2018
@@ -71,7 +71,7 @@ PlatformSP PlatformRemoteiOS::CreateInst
}
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
switch (arch->GetMachine()) {
case llvm::Triple::arm:
case llvm::Triple::aarch64:
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp Fri Dec 14 16:15:33 2018
@@ -76,7 +76,7 @@ PlatformSP PlatformiOSSimulator::CreateI
}
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
switch (arch->GetMachine()) {
case llvm::Triple::x86_64:
case llvm::Triple::x86: {
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm Fri Dec 14 16:15:33 2018
@@ -591,7 +591,7 @@ void CoreSimulatorSupport::DeviceSet::Fo
std::function<bool(const Device &)> f) {
const size_t n = GetNumDevices();
for (NSUInteger i = 0; i < n; ++i) {
- if (f(GetDeviceAtIndex(i)) == false)
+ if (!f(GetDeviceAtIndex(i)))
break;
}
}
Modified: lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp Fri Dec 14 16:15:33 2018
@@ -46,7 +46,7 @@ PlatformSP PlatformNetBSD::CreateInstanc
arch ? arch->GetTriple().getTriple() : "<null>");
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
const llvm::Triple &triple = arch->GetTriple();
switch (triple.getOS()) {
case llvm::Triple::NetBSD:
Modified: lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp Fri Dec 14 16:15:33 2018
@@ -46,7 +46,7 @@ PlatformSP PlatformOpenBSD::CreateInstan
arch ? arch->GetTriple().getTriple() : "<null>");
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
const llvm::Triple &triple = arch->GetTriple();
switch (triple.getOS()) {
case llvm::Triple::OpenBSD:
Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp Fri Dec 14 16:15:33 2018
@@ -67,7 +67,7 @@ PlatformSP PlatformWindows::CreateInstan
const bool is_host = false;
bool create = force;
- if (create == false && arch && arch->IsValid()) {
+ if (!create && arch && arch->IsValid()) {
const llvm::Triple &triple = arch->GetTriple();
switch (triple.getVendor()) {
case llvm::Triple::PC:
Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Fri Dec 14 16:15:33 2018
@@ -40,7 +40,7 @@ static bool g_initialized = false;
void PlatformRemoteGDBServer::Initialize() {
Platform::Initialize();
- if (g_initialized == false) {
+ if (!g_initialized) {
g_initialized = true;
PluginManager::RegisterPlugin(
PlatformRemoteGDBServer::GetPluginNameStatic(),
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp Fri Dec 14 16:15:33 2018
@@ -463,19 +463,13 @@ lldb_private::UUID CommunicationKDP::Get
bool CommunicationKDP::RemoteIsEFI() {
if (GetKernelVersion() == NULL)
return false;
- if (strncmp(m_kernel_version.c_str(), "EFI", 3) == 0)
- return true;
- else
- return false;
+ return strncmp(m_kernel_version.c_str(), "EFI", 3) == 0;
}
bool CommunicationKDP::RemoteIsDarwinKernel() {
if (GetKernelVersion() == NULL)
return false;
- if (m_kernel_version.find("Darwin Kernel") != std::string::npos)
- return true;
- else
- return false;
+ return m_kernel_version.find("Darwin Kernel") != std::string::npos;
}
lldb::addr_t CommunicationKDP::GetLoadAddress() {
@@ -1258,9 +1252,7 @@ bool CommunicationKDP::SendRequestResume
request_packet.PutHex32(GetCPUMask());
DataExtractor reply_packet;
- if (SendRequestAndGetReply(command, request_packet, reply_packet))
- return true;
- return false;
+ return SendRequestAndGetReply(command, request_packet, reply_packet);
}
bool CommunicationKDP::SendRequestBreakpoint(bool set, addr_t addr) {
@@ -1293,7 +1285,5 @@ bool CommunicationKDP::SendRequestSuspen
const uint32_t command_length = 8;
MakeRequestPacketHeader(command, request_packet, command_length);
DataExtractor reply_packet;
- if (SendRequestAndGetReply(command, request_packet, reply_packet))
- return true;
- return false;
+ return SendRequestAndGetReply(command, request_packet, reply_packet);
}
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp Fri Dec 14 16:15:33 2018
@@ -1670,7 +1670,7 @@ uint32_t RegisterContextDarwin_arm::SetH
return LLDB_INVALID_INDEX32;
// We must watch for either read or write
- if (read == false && write == false)
+ if (!read && !write)
return LLDB_INVALID_INDEX32;
// Can't watch more than 4 bytes per WVR/WCR pair
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp Fri Dec 14 16:15:33 2018
@@ -956,7 +956,7 @@ uint32_t RegisterContextDarwin_arm64::Se
return LLDB_INVALID_INDEX32;
// We must watch for either read or write
- if (read == false && write == false)
+ if (!read && !write)
return LLDB_INVALID_INDEX32;
// Can't watch more than 4 bytes per WVR/WCR pair
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Fri Dec 14 16:15:33 2018
@@ -324,7 +324,7 @@ void RegisterContextLLDB::InitializeNonZ
above_trap_handler = true;
if (pc == 0 || pc == 0x1) {
- if (above_trap_handler == false) {
+ if (!above_trap_handler) {
m_frame_type = eNotAValidFrame;
UnwindLogMsg("this frame has a pc of 0x0");
return;
@@ -474,7 +474,7 @@ void RegisterContextLLDB::InitializeNonZ
bool decr_pc_and_recompute_addr_range = false;
// If the symbol lookup failed...
- if (m_sym_ctx_valid == false)
+ if (!m_sym_ctx_valid)
decr_pc_and_recompute_addr_range = true;
// Or if we're in the middle of the stack (and not "above" an asynchronous
@@ -1250,7 +1250,7 @@ RegisterContextLLDB::SavedLocationForReg
// Address register and it hasn't been saved anywhere yet -- that is,
// it's still live in the actual register. Handle this specially.
- if (have_unwindplan_regloc == false && return_address_reg.IsValid() &&
+ if (!have_unwindplan_regloc && return_address_reg.IsValid() &&
IsFrameZero()) {
if (return_address_reg.GetAsKind(eRegisterKindLLDB) !=
LLDB_INVALID_REGNUM) {
@@ -1329,11 +1329,7 @@ RegisterContextLLDB::SavedLocationForReg
}
}
- if (can_fetch_pc_value && can_fetch_cfa) {
- have_unwindplan_regloc = true;
- } else {
- have_unwindplan_regloc = false;
- }
+ have_unwindplan_regloc = can_fetch_pc_value && can_fetch_cfa;
} else {
// We were unable to fall back to another unwind plan
have_unwindplan_regloc = false;
@@ -1344,7 +1340,7 @@ RegisterContextLLDB::SavedLocationForReg
ExecutionContext exe_ctx(m_thread.shared_from_this());
Process *process = exe_ctx.GetProcessPtr();
- if (have_unwindplan_regloc == false) {
+ if (!have_unwindplan_regloc) {
// If the UnwindPlan failed to give us an unwind location for this
// register, we may be able to fall back to some ABI-defined default. For
// example, some ABIs allow to determine the caller's SP via the CFA. Also,
@@ -1363,7 +1359,7 @@ RegisterContextLLDB::SavedLocationForReg
}
}
- if (have_unwindplan_regloc == false) {
+ if (!have_unwindplan_regloc) {
if (IsFrameZero()) {
// This is frame 0 - we should return the actual live register context
// value
@@ -1409,7 +1405,7 @@ RegisterContextLLDB::SavedLocationForReg
}
if (unwindplan_regloc.IsSame()) {
- if (IsFrameZero() == false &&
+ if (!IsFrameZero() &&
(regnum.GetAsKind(eRegisterKindGeneric) == LLDB_REGNUM_GENERIC_PC ||
regnum.GetAsKind(eRegisterKindGeneric) == LLDB_REGNUM_GENERIC_RA)) {
UnwindLogMsg("register %s (%d) is marked as 'IsSame' - it is a pc or "
@@ -2051,12 +2047,8 @@ bool RegisterContextLLDB::ReadPC(addr_t
pc = abi->FixCodeAddress(pc);
}
- if (m_all_registers_available == false && above_trap_handler == false &&
- (pc == 0 || pc == 1)) {
- return false;
- }
-
- return true;
+ return !(m_all_registers_available == false &&
+ above_trap_handler == false && (pc == 0 || pc == 1));
} else {
return false;
}
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp Fri Dec 14 16:15:33 2018
@@ -376,7 +376,7 @@ RegisterContextPOSIX_x86::FPRType Regist
if (m_fpr_type == eNotValid) {
// TODO: Use assembly to call cpuid on the inferior and query ebx or ecx
m_fpr_type = eXSAVE; // extended floating-point registers, if available
- if (false == ReadFPR())
+ if (!ReadFPR())
m_fpr_type = eFXSAVE; // assume generic floating-point registers
}
return m_fpr_type;
Modified: lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp Fri Dec 14 16:15:33 2018
@@ -212,15 +212,15 @@ UnwindLLDB::CursorSP UnwindLLDB::GetOneM
// On Mac OS X, the _sigtramp asynchronous signal trampoline frame may not
// have its (constructed) CFA aligned correctly -- don't do the abi
// alignment check for these.
- if (reg_ctx_sp->IsTrapHandlerFrame() == false) {
+ if (!reg_ctx_sp->IsTrapHandlerFrame()) {
// See if we can find a fallback unwind plan for THIS frame. It may be
// that the UnwindPlan we're using for THIS frame was bad and gave us a
// bad CFA. If that's not it, then see if we can change the UnwindPlan
// for the frame below us ("NEXT") -- see if using that other UnwindPlan
// gets us a better unwind state.
- if (reg_ctx_sp->TryFallbackUnwindPlan() == false ||
- reg_ctx_sp->GetCFA(cursor_sp->cfa) == false ||
- abi->CallFrameAddressIsValid(cursor_sp->cfa) == false) {
+ if (!reg_ctx_sp->TryFallbackUnwindPlan() ||
+ !reg_ctx_sp->GetCFA(cursor_sp->cfa) ||
+ !abi->CallFrameAddressIsValid(cursor_sp->cfa)) {
if (prev_frame->reg_ctx_lldb_sp->TryFallbackUnwindPlan()) {
// TryFallbackUnwindPlan for prev_frame succeeded and updated
// reg_ctx_lldb_sp field of prev_frame. However, cfa field of
@@ -385,10 +385,8 @@ bool UnwindLLDB::AddOneMoreFrame(ABI *ab
// Cursor::m_frames[m_frames.size() - 2], reg_ctx_lldb_sp field was already
// updated during TryFallbackUnwindPlan call above. However, cfa field
// still needs to be updated. Hence updating it here and then returning.
- if (!(m_frames[m_frames.size() - 2]->reg_ctx_lldb_sp->GetCFA(
- m_frames[m_frames.size() - 2]->cfa)))
- return false;
- return true;
+ return m_frames[m_frames.size() - 2]->reg_ctx_lldb_sp->GetCFA(
+ m_frames[m_frames.size() - 2]->cfa);
}
// The new frame hasn't helped in unwinding. Fall back to the original one as
@@ -470,10 +468,7 @@ bool UnwindLLDB::SearchForSavedLocationF
UnwindLLDB::RegisterSearchResult result;
result = m_frames[frame_num]->reg_ctx_lldb_sp->SavedLocationForRegister(
lldb_regnum, regloc);
- if (result == UnwindLLDB::RegisterSearchResult::eRegisterFound)
- return true;
- else
- return false;
+ return result == UnwindLLDB::RegisterSearchResult::eRegisterFound;
}
while (frame_num >= 0) {
UnwindLLDB::RegisterSearchResult result;
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp Fri Dec 14 16:15:33 2018
@@ -379,7 +379,7 @@ void GDBRemoteClientBase::Lock::SyncWith
log->PutCString("GDBRemoteClientBase::Lock::Lock sent packet: \\x03");
m_comm.m_interrupt_time = steady_clock::now();
}
- m_comm.m_cv.wait(lock, [this] { return m_comm.m_is_running == false; });
+ m_comm.m_cv.wait(lock, [this] { return !m_comm.m_is_running; });
m_did_interrupt = true;
}
m_acquired = true;
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Fri Dec 14 16:15:33 2018
@@ -656,7 +656,7 @@ GDBRemoteCommunication::CheckForPacket(c
// Size of packet before it is decompressed, for logging purposes
size_t original_packet_size = m_bytes.size();
if (CompressionIsEnabled()) {
- if (DecompressPacket() == false) {
+ if (!DecompressPacket()) {
packet.Clear();
return GDBRemoteCommunication::PacketType::Standard;
}
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Fri Dec 14 16:15:33 2018
@@ -252,10 +252,7 @@ bool GDBRemoteCommunicationClient::GetVA
m_attach_or_wait_reply = eLazyBoolYes;
}
}
- if (m_attach_or_wait_reply == eLazyBoolYes)
- return true;
- else
- return false;
+ return m_attach_or_wait_reply == eLazyBoolYes;
}
bool GDBRemoteCommunicationClient::GetSyncThreadStateSupported() {
@@ -269,14 +266,11 @@ bool GDBRemoteCommunicationClient::GetSy
m_prepare_for_reg_writing_reply = eLazyBoolYes;
}
}
- if (m_prepare_for_reg_writing_reply == eLazyBoolYes)
- return true;
- else
- return false;
+ return m_prepare_for_reg_writing_reply == eLazyBoolYes;
}
void GDBRemoteCommunicationClient::ResetDiscoverableSettings(bool did_exec) {
- if (did_exec == false) {
+ if (!did_exec) {
// Hard reset everything, this is when we first connect to a GDB server
m_supports_not_sending_acks = eLazyBoolCalculate;
m_supports_thread_suffix = eLazyBoolCalculate;
@@ -745,7 +739,7 @@ lldb::pid_t GDBRemoteCommunicationClient
bool sequence_mutex_unavailable;
size_t size;
size = GetCurrentThreadIDs(thread_ids, sequence_mutex_unavailable);
- if (size && sequence_mutex_unavailable == false) {
+ if (size && !sequence_mutex_unavailable) {
m_curr_pid = thread_ids.front();
m_curr_pid_is_valid = eLazyBoolYes;
return m_curr_pid;
@@ -839,8 +833,8 @@ int GDBRemoteCommunicationClient::SendEn
if (name_equal_value && name_equal_value[0]) {
StreamString packet;
bool send_hex_encoding = false;
- for (const char *p = name_equal_value;
- *p != '\0' && send_hex_encoding == false; ++p) {
+ for (const char *p = name_equal_value; *p != '\0' && !send_hex_encoding;
+ ++p) {
if (isprint(*p)) {
switch (*p) {
case '$':
@@ -1693,7 +1687,7 @@ Status GDBRemoteCommunicationClient::Get
found_num_field = true;
}
}
- if (found_num_field == false) {
+ if (!found_num_field) {
m_supports_watchpoint_support_info = eLazyBoolNo;
}
} else {
@@ -1728,12 +1722,10 @@ GDBRemoteCommunicationClient::GetWatchpo
// On targets like MIPS and ppc64le, watchpoint exceptions are always
// generated before the instruction is executed. The connected target may
// not support qHostInfo or qWatchpointSupportInfo packets.
- if (atype == llvm::Triple::mips || atype == llvm::Triple::mipsel ||
- atype == llvm::Triple::mips64 || atype == llvm::Triple::mips64el ||
- atype == llvm::Triple::ppc64le)
- after = false;
- else
- after = true;
+ after =
+ !(atype == llvm::Triple::mips || atype == llvm::Triple::mipsel ||
+ atype == llvm::Triple::mips64 || atype == llvm::Triple::mips64el ||
+ atype == llvm::Triple::ppc64le);
} else {
// For MIPS and ppc64le, set m_watchpoints_trigger_after_instruction to
// eLazyBoolNo if it is not calculated before.
@@ -3776,7 +3768,7 @@ void GDBRemoteCommunicationClient::Serve
// Is this the initial qSymbol:: packet?
bool first_qsymbol_query = true;
- if (m_supports_qSymbol && m_qSymbol_requests_done == false) {
+ if (m_supports_qSymbol && !m_qSymbol_requests_done) {
Lock lock(*this, false);
if (lock) {
StreamString packet;
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Fri Dec 14 16:15:33 2018
@@ -458,7 +458,7 @@ bool GDBRemoteRegisterContext::ReadAllRe
((ProcessGDBRemote *)process)->GetGDBRemote());
const bool use_g_packet =
- gdb_comm.AvoidGPackets((ProcessGDBRemote *)process) == false;
+ !gdb_comm.AvoidGPackets((ProcessGDBRemote *)process);
GDBRemoteClientBase::Lock lock(gdb_comm, false);
if (lock) {
@@ -521,7 +521,7 @@ bool GDBRemoteRegisterContext::WriteAllR
((ProcessGDBRemote *)process)->GetGDBRemote());
const bool use_g_packet =
- gdb_comm.AvoidGPackets((ProcessGDBRemote *)process) == false;
+ !gdb_comm.AvoidGPackets((ProcessGDBRemote *)process);
GDBRemoteClientBase::Lock lock(gdb_comm, false);
if (lock) {
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Fri Dec 14 16:15:33 2018
@@ -1528,7 +1528,7 @@ Status ProcessGDBRemote::DoResume() {
new EventDataBytes(continue_packet.GetString().data(),
continue_packet.GetSize()));
- if (listener_sp->GetEvent(event_sp, std::chrono::seconds(5)) == false) {
+ if (!listener_sp->GetEvent(event_sp, std::chrono::seconds(5))) {
error.SetErrorString("Resume timed out.");
if (log)
log->Printf("ProcessGDBRemote::DoResume: Resume timed out.");
@@ -1984,7 +1984,7 @@ ThreadSP ProcessGDBRemote::SetThreadStop
}
}
- if (!handled && signo && did_exec == false) {
+ if (!handled && signo && !did_exec) {
if (signo == SIGTRAP) {
// Currently we are going to assume SIGTRAP means we are either
// hitting a breakpoint or hardware single stepping.
@@ -2698,7 +2698,7 @@ void ProcessGDBRemote::SetLastStopPacket
// We are are not using non-stop mode, there can only be one last stop
// reply packet, so clear the list.
- if (GetTarget().GetNonStopModeEnabled() == false)
+ if (!GetTarget().GetNonStopModeEnabled())
m_stop_packet_stack.clear();
// Add this stop packet to the stop packet stack This stack will get popped
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp Fri Dec 14 16:15:33 2018
@@ -197,13 +197,10 @@ void ThreadGDBRemote::SetQueueLibdispatc
}
bool ThreadGDBRemote::ThreadHasQueueInformation() const {
- if (m_thread_dispatch_qaddr != 0 &&
- m_thread_dispatch_qaddr != LLDB_INVALID_ADDRESS &&
- m_dispatch_queue_t != LLDB_INVALID_ADDRESS &&
- m_queue_kind != eQueueKindUnknown && m_queue_serial_number != 0) {
- return true;
- }
- return false;
+ return m_thread_dispatch_qaddr != 0 &&
+ m_thread_dispatch_qaddr != LLDB_INVALID_ADDRESS &&
+ m_dispatch_queue_t != LLDB_INVALID_ADDRESS &&
+ m_queue_kind != eQueueKindUnknown && m_queue_serial_number != 0;
}
LazyBool ThreadGDBRemote::GetAssociatedWithLibdispatchQueue() {
Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp Fri Dec 14 16:15:33 2018
@@ -302,36 +302,38 @@ Status ProcessMachCore::DoLoadCore() {
// LC_IDENT is very obsolete and should not be used in new code, but if the
// load command is present, let's use the contents.
std::string corefile_identifier = core_objfile->GetIdentifierString();
- if (found_main_binary_definitively == false
- && corefile_identifier.find("Darwin Kernel") != std::string::npos) {
- UUID uuid;
- addr_t addr = LLDB_INVALID_ADDRESS;
- if (corefile_identifier.find("UUID=") != std::string::npos) {
- size_t p = corefile_identifier.find("UUID=") + strlen("UUID=");
- std::string uuid_str = corefile_identifier.substr(p, 36);
- uuid.SetFromStringRef(uuid_str);
- }
- if (corefile_identifier.find("stext=") != std::string::npos) {
- size_t p = corefile_identifier.find("stext=") + strlen("stext=");
- if (corefile_identifier[p] == '0' && corefile_identifier[p + 1] == 'x') {
- errno = 0;
- addr = ::strtoul(corefile_identifier.c_str() + p, NULL, 16);
- if (errno != 0 || addr == 0)
- addr = LLDB_INVALID_ADDRESS;
- }
- }
- if (uuid.IsValid() && addr != LLDB_INVALID_ADDRESS) {
- m_mach_kernel_addr = addr;
- found_main_binary_definitively = true;
- if (log)
- log->Printf("ProcessMachCore::DoLoadCore: Using the kernel address 0x%" PRIx64
- " from LC_IDENT/LC_NOTE 'kern ver str' string: '%s'", addr, corefile_identifier.c_str());
+ if (!found_main_binary_definitively &&
+ corefile_identifier.find("Darwin Kernel") != std::string::npos) {
+ UUID uuid;
+ addr_t addr = LLDB_INVALID_ADDRESS;
+ if (corefile_identifier.find("UUID=") != std::string::npos) {
+ size_t p = corefile_identifier.find("UUID=") + strlen("UUID=");
+ std::string uuid_str = corefile_identifier.substr(p, 36);
+ uuid.SetFromStringRef(uuid_str);
+ }
+ if (corefile_identifier.find("stext=") != std::string::npos) {
+ size_t p = corefile_identifier.find("stext=") + strlen("stext=");
+ if (corefile_identifier[p] == '0' && corefile_identifier[p + 1] == 'x') {
+ errno = 0;
+ addr = ::strtoul(corefile_identifier.c_str() + p, NULL, 16);
+ if (errno != 0 || addr == 0)
+ addr = LLDB_INVALID_ADDRESS;
}
+ }
+ if (uuid.IsValid() && addr != LLDB_INVALID_ADDRESS) {
+ m_mach_kernel_addr = addr;
+ found_main_binary_definitively = true;
+ if (log)
+ log->Printf(
+ "ProcessMachCore::DoLoadCore: Using the kernel address 0x%" PRIx64
+ " from LC_IDENT/LC_NOTE 'kern ver str' string: '%s'",
+ addr, corefile_identifier.c_str());
+ }
}
- if (found_main_binary_definitively == false
- && (m_dyld_addr == LLDB_INVALID_ADDRESS
- || m_mach_kernel_addr == LLDB_INVALID_ADDRESS)) {
+ if (!found_main_binary_definitively &&
+ (m_dyld_addr == LLDB_INVALID_ADDRESS ||
+ m_mach_kernel_addr == LLDB_INVALID_ADDRESS)) {
// We need to locate the main executable in the memory ranges we have in
// the core file. We need to search for both a user-process dyld binary
// and a kernel binary in memory; we must look at all the pages in the
@@ -352,16 +354,15 @@ Status ProcessMachCore::DoLoadCore() {
}
}
- if (found_main_binary_definitively == false
- && m_mach_kernel_addr != LLDB_INVALID_ADDRESS) {
+ if (!found_main_binary_definitively &&
+ m_mach_kernel_addr != LLDB_INVALID_ADDRESS) {
// In the case of multiple kernel images found in the core file via
// exhaustive search, we may not pick the correct one. See if the
// DynamicLoaderDarwinKernel's search heuristics might identify the correct
// one. Most of the time, I expect the address from SearchForDarwinKernel()
// will be the same as the address we found via exhaustive search.
- if (GetTarget().GetArchitecture().IsValid() == false &&
- m_core_module_sp.get()) {
+ if (!GetTarget().GetArchitecture().IsValid() && m_core_module_sp.get()) {
GetTarget().SetArchitecture(m_core_module_sp->GetArchitecture());
}
Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp Fri Dec 14 16:15:33 2018
@@ -222,9 +222,7 @@ PythonBytes::~PythonBytes() {}
bool PythonBytes::Check(PyObject *py_obj) {
if (!py_obj)
return false;
- if (PyBytes_Check(py_obj))
- return true;
- return false;
+ return PyBytes_Check(py_obj);
}
void PythonBytes::Reset(PyRefType type, PyObject *py_obj) {
@@ -294,9 +292,7 @@ PythonByteArray::~PythonByteArray() {}
bool PythonByteArray::Check(PyObject *py_obj) {
if (!py_obj)
return false;
- if (PyByteArray_Check(py_obj))
- return true;
- return false;
+ return PyByteArray_Check(py_obj);
}
void PythonByteArray::Reset(PyRefType type, PyObject *py_obj) {
Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Fri Dec 14 16:15:33 2018
@@ -208,7 +208,7 @@ ScriptInterpreterPython::Locker::Locker(
m_python_interpreter(py_interpreter) {
DoAcquireLock();
if ((on_entry & InitSession) == InitSession) {
- if (DoInitSession(on_entry, in, out, err) == false) {
+ if (!DoInitSession(on_entry, in, out, err)) {
// Don't teardown the session if we didn't init it.
m_teardown_session = false;
}
@@ -2838,7 +2838,7 @@ bool ScriptInterpreterPython::LoadScript
bool was_imported = (was_imported_globally || was_imported_locally);
- if (was_imported == true && can_reload == false) {
+ if (was_imported && !can_reload) {
error.SetErrorString("module already imported");
return false;
}
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Fri Dec 14 16:15:33 2018
@@ -657,7 +657,7 @@ TypeSP DWARFASTParserClang::ParseTypeFro
}
if (byte_size_valid && byte_size == 0 && type_name_cstr &&
- die.HasChildren() == false &&
+ !die.HasChildren() &&
sc.comp_unit->GetLanguage() == eLanguageTypeObjC) {
// Work around an issue with clang at the moment where forward
// declarations for objective C classes are emitted as:
@@ -895,7 +895,7 @@ TypeSP DWARFASTParserClang::ParseTypeFro
// has child classes or types that require the class to be created
// for use as their decl contexts the class will be ready to accept
// these child definitions.
- if (die.HasChildren() == false) {
+ if (!die.HasChildren()) {
// No children for this struct/union/class, lets finish it
if (ClangASTContext::StartTagDeclarationDefinition(clang_type)) {
ClangASTContext::CompleteTagDeclarationDefinition(clang_type);
@@ -1746,7 +1746,7 @@ TypeSP DWARFASTParserClang::ParseTypeFro
element_type->GetForwardCompilerType();
if (ClangASTContext::IsCXXClassType(array_element_type) &&
- array_element_type.GetCompleteType() == false) {
+ !array_element_type.GetCompleteType()) {
ModuleSP module_sp = die.GetModule();
if (module_sp) {
if (die.GetCU()->GetProducer() == eProducerClang)
@@ -2269,7 +2269,7 @@ bool DWARFASTParserClang::CompleteTypeFr
if (type_source_info) {
CompilerType base_class_type(
&m_ast, type_source_info->getType().getAsOpaquePtr());
- if (base_class_type.GetCompleteType() == false) {
+ if (!base_class_type.GetCompleteType()) {
auto module = dwarf->GetObjectFile()->GetModule();
module->ReportError(":: Class '%s' has a base class '%s' which "
"does not have a complete definition.",
@@ -2885,7 +2885,7 @@ bool DWARFASTParserClang::ParseChildMemb
break;
}
- if (is_artificial == false) {
+ if (!is_artificial) {
Type *member_type = die.ResolveTypeUID(DIERef(encoding_form));
clang::FieldDecl *field_decl = NULL;
@@ -3083,7 +3083,7 @@ bool DWARFASTParserClang::ParseChildMemb
}
if (ClangASTContext::IsCXXClassType(member_clang_type) &&
- member_clang_type.GetCompleteType() == false) {
+ !member_clang_type.GetCompleteType()) {
if (die.GetCU()->GetProducer() == eProducerClang)
module_sp->ReportError(
"DWARF DIE at 0x%8.8x (class %s) has a member variable "
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp Fri Dec 14 16:15:33 2018
@@ -25,7 +25,7 @@ DWARFDebugMacroHeader::ParseHeader(const
header.m_version = debug_macro_data.GetU16(offset);
uint8_t flags = debug_macro_data.GetU8(offset);
- header.m_offset_is_64_bit = flags & OFFSET_SIZE_MASK ? true : false;
+ header.m_offset_is_64_bit = (flags & OFFSET_SIZE_MASK) != 0;
if (flags & DEBUG_LINE_OFFSET_MASK) {
if (header.m_offset_is_64_bit)
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp Fri Dec 14 16:15:33 2018
@@ -648,9 +648,7 @@ void DWARFUnit::SetUserData(void *d) {
}
bool DWARFUnit::Supports_DW_AT_APPLE_objc_complete_type() {
- if (GetProducer() == eProducerLLVMGCC)
- return false;
- return true;
+ return GetProducer() != eProducerLLVMGCC;
}
bool DWARFUnit::DW_AT_decl_file_attributes_are_invalid() {
@@ -662,11 +660,8 @@ bool DWARFUnit::DW_AT_decl_file_attribut
bool DWARFUnit::Supports_unnamed_objc_bitfields() {
if (GetProducer() == eProducerClang) {
const uint32_t major_version = GetProducerVersionMajor();
- if (major_version > 425 ||
- (major_version == 425 && GetProducerVersionUpdate() >= 13))
- return true;
- else
- return false;
+ return major_version > 425 ||
+ (major_version == 425 && GetProducerVersionUpdate() >= 13);
}
return true; // Assume all other compilers didn't have incorrect ObjC bitfield
// info
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri Dec 14 16:15:33 2018
@@ -1679,7 +1679,7 @@ void SymbolFileDWARF::UpdateExternalModu
DWARFUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx);
const DWARFBaseDIE die = dwarf_cu->GetUnitDIEOnly();
- if (die && die.HasChildren() == false) {
+ if (die && !die.HasChildren()) {
const char *name = die.GetAttributeValueAsString(DW_AT_name, nullptr);
if (name) {
@@ -2265,7 +2265,7 @@ bool SymbolFileDWARF::ResolveFunction(co
sc.block = function_block.FindBlockByID(inlined_die.GetID());
if (sc.block == NULL)
sc.block = function_block.FindBlockByID(inlined_die.GetOffset());
- if (sc.block == NULL || sc.block->GetStartAddress(addr) == false)
+ if (sc.block == NULL || !sc.block->GetStartAddress(addr))
addr.Clear();
} else {
sc.block = NULL;
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Fri Dec 14 16:15:33 2018
@@ -89,7 +89,7 @@ SymbolFileDWARFDebugMap::CompileUnitInfo
idx < oso_end_idx; ++idx) {
Symbol *exe_symbol = exe_symtab->SymbolAtIndex(idx);
if (exe_symbol) {
- if (exe_symbol->IsDebug() == false)
+ if (!exe_symbol->IsDebug())
continue;
switch (exe_symbol->GetType()) {
@@ -179,7 +179,7 @@ public:
GetSymbolVendor(bool can_create = true,
lldb_private::Stream *feedback_strm = NULL) override {
// Scope for locker
- if (m_symfile_ap.get() || can_create == false)
+ if (m_symfile_ap.get() || !can_create)
return m_symfile_ap.get();
ModuleSP exe_module_sp(m_exe_module_wp.lock());
@@ -1155,7 +1155,7 @@ TypeSP SymbolFileDWARFDebugMap::FindComp
// Only search all .o files for the definition if we don't need the
// implementation because otherwise, with a valid debug map we should have
// the ObjC class symbol and the code above should have found it.
- if (must_be_implementation == false) {
+ if (!must_be_implementation) {
TypeSP type_sp;
ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
@@ -1190,10 +1190,7 @@ uint32_t SymbolFileDWARFDebugMap::FindTy
ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
oso_dwarf->FindTypes(sc, name, parent_decl_ctx, append, max_matches,
searched_symbol_files, types);
- if (types.GetSize() >= max_matches)
- return true;
- else
- return false;
+ return types.GetSize() >= max_matches;
});
}
Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp Fri Dec 14 16:15:33 2018
@@ -658,7 +658,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTyp
CompilerType element_ast_type = element_type->GetForwardCompilerType();
// If element type is UDT, it needs to be complete.
if (ClangASTContext::IsCXXClassType(element_ast_type) &&
- element_ast_type.GetCompleteType() == false) {
+ !element_ast_type.GetCompleteType()) {
if (ClangASTContext::StartTagDeclarationDefinition(element_ast_type)) {
ClangASTContext::CompleteTagDeclarationDefinition(element_ast_type);
} else {
Modified: lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp Fri Dec 14 16:15:33 2018
@@ -237,8 +237,7 @@ SymbolVendorMacOSX::CreateInstance(const
// object is DBGSourcePath
std::string DBGSourcePath =
object->GetStringValue();
- if (new_style_source_remapping_dictionary ==
- false &&
+ if (!new_style_source_remapping_dictionary &&
!original_DBGSourcePath_value.empty()) {
DBGSourcePath = original_DBGSourcePath_value;
}
Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp Fri Dec 14 16:15:33 2018
@@ -238,7 +238,7 @@ AppleGetItemInfoHandler::GetItemInfo(Thr
error.Clear();
- if (thread.SafeToCallFunctions() == false) {
+ if (!thread.SafeToCallFunctions()) {
if (log)
log->Printf("Not safe to call functions on thread 0x%" PRIx64,
thread.GetID());
Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp Fri Dec 14 16:15:33 2018
@@ -241,7 +241,7 @@ AppleGetPendingItemsHandler::GetPendingI
error.Clear();
- if (thread.SafeToCallFunctions() == false) {
+ if (!thread.SafeToCallFunctions()) {
if (log)
log->Printf("Not safe to call functions on thread 0x%" PRIx64,
thread.GetID());
Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp Fri Dec 14 16:15:33 2018
@@ -243,7 +243,7 @@ AppleGetQueuesHandler::GetCurrentQueues(
error.Clear();
- if (thread.SafeToCallFunctions() == false) {
+ if (!thread.SafeToCallFunctions()) {
if (log)
log->Printf("Not safe to call functions on thread 0x%" PRIx64,
thread.GetID());
Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp Fri Dec 14 16:15:33 2018
@@ -248,7 +248,7 @@ AppleGetThreadItemInfoHandler::GetThread
error.Clear();
- if (thread.SafeToCallFunctions() == false) {
+ if (!thread.SafeToCallFunctions()) {
if (log)
log->Printf("Not safe to call functions on thread 0x%" PRIx64,
thread.GetID());
Modified: lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp (original)
+++ lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp Fri Dec 14 16:15:33 2018
@@ -100,10 +100,10 @@ bool UnwindAssembly_x86::AugmentUnwindPl
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;
}
Modified: lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp (original)
+++ lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp Fri Dec 14 16:15:33 2018
@@ -304,26 +304,20 @@ bool x86AssemblyInspectionEngine::nonvol
// 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 @@ bool x86AssemblyInspectionEngine::mov_re
// 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 @@ bool x86AssemblyInspectionEngine::GetNon
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 @@ bool x86AssemblyInspectionEngine::GetNon
// 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 @@ bool x86AssemblyInspectionEngine::GetNon
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 @@ bool x86AssemblyInspectionEngine::GetNon
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 @@ bool x86AssemblyInspectionEngine::GetNon
}
}
- 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 @@ bool x86AssemblyInspectionEngine::GetNon
// 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 @@ bool x86AssemblyInspectionEngine::FindFi
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) {
Modified: lldb/trunk/source/Symbol/Block.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Block.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Block.cpp (original)
+++ lldb/trunk/source/Symbol/Block.cpp Fri Dec 14 16:15:33 2018
@@ -83,7 +83,7 @@ void Block::Dump(Stream *s, addr_t base_
size_t num_ranges = m_ranges.GetSize();
for (size_t i = 0; i < num_ranges; ++i) {
const Range &range = m_ranges.GetEntryRef(i);
- if (parent_block != nullptr && parent_block->Contains(range) == false)
+ if (parent_block != nullptr && !parent_block->Contains(range))
*s << '!';
else
*s << ' ';
@@ -369,7 +369,7 @@ void Block::SetInlinedFunctionInfo(const
}
VariableListSP Block::GetBlockVariableList(bool can_create) {
- if (m_parsed_block_variables == false) {
+ if (!m_parsed_block_variables) {
if (m_variable_list_sp.get() == nullptr && can_create) {
m_parsed_block_variables = true;
SymbolContext sc;
@@ -402,7 +402,7 @@ Block::AppendBlockVariables(bool can_cre
collection::const_iterator pos, end = m_children.end();
for (pos = m_children.begin(); pos != end; ++pos) {
Block *child_block = pos->get();
- if (stop_if_child_block_is_inlined_function == false ||
+ if (!stop_if_child_block_is_inlined_function ||
child_block->GetInlinedFunctionInfo() == nullptr) {
num_variables_added += child_block->AppendBlockVariables(
can_create, get_child_block_variables,
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Dec 14 16:15:33 2018
@@ -992,9 +992,7 @@ TargetInfo *ClangASTContext::getTargetIn
static inline bool QualTypeMatchesBitSize(const uint64_t bit_size,
ASTContext *ast, QualType qual_type) {
uint64_t qual_type_bit_size = ast->getTypeSize(qual_type);
- if (qual_type_bit_size == bit_size)
- return true;
- return false;
+ return qual_type_bit_size == bit_size;
}
CompilerType
@@ -1866,8 +1864,7 @@ CompilerType ClangASTContext::CreateObjC
}
static inline bool BaseSpecifierIsEmpty(const CXXBaseSpecifier *b) {
- return ClangASTContext::RecordHasFields(b->getType()->getAsCXXRecordDecl()) ==
- false;
+ return !ClangASTContext::RecordHasFields(b->getType()->getAsCXXRecordDecl());
}
uint32_t
@@ -3936,9 +3933,7 @@ bool ClangASTContext::IsCXXClassType(con
return false;
clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
- if (!qual_type.isNull() && qual_type->getAsCXXRecordDecl() != nullptr)
- return true;
- return false;
+ return !qual_type.isNull() && qual_type->getAsCXXRecordDecl() != nullptr;
}
bool ClangASTContext::IsBeingDefined(lldb::opaque_compiler_type_t type) {
@@ -5593,7 +5588,7 @@ uint32_t ClangASTContext::GetNumChildren
->getDecl());
// Skip empty base classes
- if (ClangASTContext::RecordHasFields(base_class_decl) == false)
+ if (!ClangASTContext::RecordHasFields(base_class_decl))
continue;
num_children++;
@@ -6655,7 +6650,7 @@ CompilerType ClangASTContext::GetChildCo
if (omit_empty_base_classes) {
base_class_decl = llvm::cast<clang::CXXRecordDecl>(
base_class->getType()->getAs<clang::RecordType>()->getDecl());
- if (ClangASTContext::RecordHasFields(base_class_decl) == false)
+ if (!ClangASTContext::RecordHasFields(base_class_decl))
continue;
}
@@ -7450,7 +7445,7 @@ ClangASTContext::GetIndexOfChildWithName
->getAs<clang::RecordType>()
->getDecl());
if (omit_empty_base_classes &&
- ClangASTContext::RecordHasFields(base_class_decl) == false)
+ !ClangASTContext::RecordHasFields(base_class_decl))
continue;
CompilerType base_class_clang_type(getASTContext(),
@@ -9105,8 +9100,7 @@ void ClangASTContext::DumpValue(
base_class->getType()->getAs<clang::RecordType>()->getDecl());
// Skip empty base classes
- if (verbose == false &&
- ClangASTContext::RecordHasFields(base_class_decl) == false)
+ if (!verbose && !ClangASTContext::RecordHasFields(base_class_decl))
continue;
if (base_class->isVirtual())
Modified: lldb/trunk/source/Symbol/ClangASTImporter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTImporter.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTImporter.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTImporter.cpp Fri Dec 14 16:15:33 2018
@@ -1002,7 +1002,7 @@ clang::Decl *ClangASTImporter::Minion::I
if (isa<TagDecl>(to) || isa<ObjCInterfaceDecl>(to)) {
RecordDecl *from_record_decl = dyn_cast<RecordDecl>(from);
if (from_record_decl == nullptr ||
- from_record_decl->isInjectedClassName() == false) {
+ !from_record_decl->isInjectedClassName()) {
NamedDecl *to_named_decl = dyn_cast<NamedDecl>(to);
if (!m_decls_already_deported->count(to_named_decl))
Modified: lldb/trunk/source/Symbol/CompactUnwindInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompactUnwindInfo.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompactUnwindInfo.cpp (original)
+++ lldb/trunk/source/Symbol/CompactUnwindInfo.cpp Fri Dec 14 16:15:33 2018
@@ -259,7 +259,7 @@ void CompactUnwindInfo::ScanIndex(const
m_objfile.GetModule()->LogMessage(
log, "Reading compact unwind first-level indexes");
- if (m_unwindinfo_data_computed == false) {
+ if (!m_unwindinfo_data_computed) {
if (m_section_sp->IsEncrypted()) {
// Can't get section contents of a protected/encrypted section until we
// have a live process and can read them out of memory.
@@ -529,7 +529,7 @@ bool CompactUnwindInfo::GetCompactUnwind
--it;
}
- if (it->sentinal_entry == true) {
+ if (it->sentinal_entry) {
return false;
}
@@ -925,7 +925,7 @@ bool CompactUnwindInfo::CreateUnwindPlan
for (uint32_t i = 0; i < register_count; i++) {
int renum = 0;
for (int j = 1; j < 7; j++) {
- if (used[j] == false) {
+ if (!used[j]) {
if (renum == permunreg[i]) {
registers[i] = j;
used[j] = true;
@@ -1187,7 +1187,7 @@ bool CompactUnwindInfo::CreateUnwindPlan
for (uint32_t i = 0; i < register_count; i++) {
int renum = 0;
for (int j = 1; j < 7; j++) {
- if (used[j] == false) {
+ if (!used[j]) {
if (renum == permunreg[i]) {
registers[i] = j;
used[j] = true;
Modified: lldb/trunk/source/Symbol/CompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompileUnit.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompileUnit.cpp (original)
+++ lldb/trunk/source/Symbol/CompileUnit.cpp Fri Dec 14 16:15:33 2018
@@ -291,7 +291,7 @@ uint32_t CompileUnit::ResolveSymbolConte
// If we are not looking for inlined functions and our file spec doesn't
// match then we are done...
- if (file_spec_matches_cu_file_spec == false && check_inlines == false)
+ if (!file_spec_matches_cu_file_spec && !check_inlines)
return 0;
uint32_t file_idx =
Modified: lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp (original)
+++ lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp Fri Dec 14 16:15:33 2018
@@ -161,7 +161,7 @@ bool DWARFCallFrameInfo::GetUnwindPlan(A
module_sp->GetObjectFile() != &m_objfile)
return false;
- if (GetFDEEntryByFileAddress(addr.GetFileAddress(), fde_entry) == false)
+ if (!GetFDEEntryByFileAddress(addr.GetFileAddress(), fde_entry))
return false;
return FDEToUnwindPlan(fde_entry.data, addr, unwind_plan);
}
@@ -243,7 +243,7 @@ DWARFCallFrameInfo::CIESP
DWARFCallFrameInfo::ParseCIE(const dw_offset_t cie_offset) {
CIESP cie_sp(new CIE(cie_offset));
lldb::offset_t offset = cie_offset;
- if (m_cfi_data_initialized == false)
+ if (!m_cfi_data_initialized)
GetCFIData();
uint32_t length = m_cfi_data.GetU32(&offset);
dw_offset_t cie_id, end_offset;
@@ -394,7 +394,7 @@ DWARFCallFrameInfo::ParseCIE(const dw_of
}
void DWARFCallFrameInfo::GetCFIData() {
- if (m_cfi_data_initialized == false) {
+ if (!m_cfi_data_initialized) {
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
if (log)
m_objfile.GetModule()->LogMessage(log, "Reading EH frame info");
@@ -431,7 +431,7 @@ void DWARFCallFrameInfo::GetFDEIndex() {
}
lldb::offset_t offset = 0;
- if (m_cfi_data_initialized == false)
+ if (!m_cfi_data_initialized)
GetCFIData();
while (m_cfi_data.ValidOffsetForDataOfSize(offset, 8)) {
const dw_offset_t current_entry = offset;
@@ -533,7 +533,7 @@ bool DWARFCallFrameInfo::FDEToUnwindPlan
if (m_section_sp.get() == nullptr || m_section_sp->IsEncrypted())
return false;
- if (m_cfi_data_initialized == false)
+ if (!m_cfi_data_initialized)
GetCFIData();
uint32_t length = m_cfi_data.GetU32(&offset);
Modified: lldb/trunk/source/Symbol/FuncUnwinders.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/FuncUnwinders.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/FuncUnwinders.cpp (original)
+++ lldb/trunk/source/Symbol/FuncUnwinders.cpp Fri Dec 14 16:15:33 2018
@@ -255,7 +255,7 @@ UnwindPlanSP FuncUnwinders::GetAssemblyU
int current_offset) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
if (m_unwind_plan_assembly_sp.get() || m_tried_unwind_plan_assembly ||
- m_unwind_table.GetAllowAssemblyEmulationUnwindPlans() == false) {
+ !m_unwind_table.GetAllowAssemblyEmulationUnwindPlans()) {
return m_unwind_plan_assembly_sp;
}
Modified: lldb/trunk/source/Symbol/ObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ObjectFile.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ObjectFile.cpp (original)
+++ lldb/trunk/source/Symbol/ObjectFile.cpp Fri Dec 14 16:15:33 2018
@@ -588,9 +588,7 @@ bool ObjectFile::SplitArchivePathWithObj
regex_match.GetMatchAtIndex(path_with_object, 2, obj)) {
archive_file.SetFile(path, FileSpec::Style::native);
archive_object.SetCString(obj.c_str());
- if (must_exist && !FileSystem::Instance().Exists(archive_file))
- return false;
- return true;
+ return !(must_exist && !FileSystem::Instance().Exists(archive_file));
}
}
return false;
Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Fri Dec 14 16:15:33 2018
@@ -105,12 +105,12 @@ bool SymbolContext::DumpStopContext(Stre
if (function != nullptr) {
SymbolContext inline_parent_sc;
Address inline_parent_addr;
- if (show_function_name == false) {
+ if (!show_function_name) {
s->Printf("<");
dumped_something = true;
} else {
ConstString name;
- if (show_function_arguments == false)
+ if (!show_function_arguments)
name = function->GetNameNoArguments();
if (!name)
name = function->GetName();
@@ -122,7 +122,7 @@ bool SymbolContext::DumpStopContext(Stre
const addr_t function_offset =
addr.GetOffset() -
function->GetAddressRange().GetBaseAddress().GetOffset();
- if (show_function_name == false) {
+ if (!show_function_name) {
// Print +offset even if offset is 0
dumped_something = true;
s->Printf("+%" PRIu64 ">", function_offset);
@@ -171,7 +171,7 @@ bool SymbolContext::DumpStopContext(Stre
}
}
} else if (symbol != nullptr) {
- if (show_function_name == false) {
+ if (!show_function_name) {
s->Printf("<");
dumped_something = true;
} else if (symbol->GetName()) {
@@ -184,7 +184,7 @@ bool SymbolContext::DumpStopContext(Stre
if (addr.IsValid() && symbol->ValueIsAddress()) {
const addr_t symbol_offset =
addr.GetOffset() - symbol->GetAddressRef().GetOffset();
- if (show_function_name == false) {
+ if (!show_function_name) {
// Print +offset even if offset is 0
dumped_something = true;
s->Printf("+%" PRIu64 ">", symbol_offset);
@@ -1259,7 +1259,7 @@ bool SymbolContextList::AppendIfUnique(c
}
if (merge_symbol_into_function && sc.symbol != nullptr &&
sc.comp_unit == nullptr && sc.function == nullptr &&
- sc.block == nullptr && sc.line_entry.IsValid() == false) {
+ sc.block == nullptr && !sc.line_entry.IsValid()) {
if (sc.symbol->ValueIsAddress()) {
for (pos = m_symbol_contexts.begin(); pos != end; ++pos) {
// Don't merge symbols into inlined function symbol contexts
@@ -1289,7 +1289,7 @@ bool SymbolContextList::MergeSymbolConte
const SymbolContext &symbol_sc, uint32_t start_idx, uint32_t stop_idx) {
if (symbol_sc.symbol != nullptr && symbol_sc.comp_unit == nullptr &&
symbol_sc.function == nullptr && symbol_sc.block == nullptr &&
- symbol_sc.line_entry.IsValid() == false) {
+ !symbol_sc.line_entry.IsValid()) {
if (symbol_sc.symbol->ValueIsAddress()) {
const size_t end = std::min<size_t>(m_symbol_contexts.size(), stop_idx);
for (size_t i = start_idx; i < end; ++i) {
Modified: lldb/trunk/source/Symbol/Symtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symtab.cpp (original)
+++ lldb/trunk/source/Symbol/Symtab.cpp Fri Dec 14 16:15:33 2018
@@ -740,7 +740,7 @@ uint32_t Symtab::AppendSymbolIndexesMatc
for (uint32_t i = 0; i < sym_end; i++) {
if (symbol_type == eSymbolTypeAny ||
m_symbols[i].GetType() == symbol_type) {
- if (CheckSymbolAtIndex(i, symbol_debug_type, symbol_visibility) == false)
+ if (!CheckSymbolAtIndex(i, symbol_debug_type, symbol_visibility))
continue;
const char *name = m_symbols[i].GetName().AsCString();
Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Fri Dec 14 16:15:33 2018
@@ -746,10 +746,7 @@ void TypeAndOrName::SetCompilerType(Comp
}
bool TypeAndOrName::IsEmpty() const {
- if ((bool)m_type_name || (bool)m_type_pair)
- return false;
- else
- return true;
+ return !((bool)m_type_name || (bool)m_type_pair);
}
void TypeAndOrName::Clear() {
Modified: lldb/trunk/source/Symbol/TypeSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/TypeSystem.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/TypeSystem.cpp (original)
+++ lldb/trunk/source/Symbol/TypeSystem.cpp Fri Dec 14 16:15:33 2018
@@ -193,7 +193,7 @@ void TypeSystemMap::ForEach(std::functio
TypeSystem *type_system = pair.second.get();
if (type_system && !visited.count(type_system)) {
visited.insert(type_system);
- if (callback(type_system) == false)
+ if (!callback(type_system))
break;
}
}
Modified: lldb/trunk/source/Target/Platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Target/Platform.cpp (original)
+++ lldb/trunk/source/Target/Platform.cpp Fri Dec 14 16:15:33 2018
@@ -1586,14 +1586,14 @@ Status Platform::GetRemoteSharedModule(c
if (process->GetModuleSpec(module_spec.GetFileSpec(),
module_spec.GetArchitecture(),
resolved_module_spec)) {
- if (module_spec.GetUUID().IsValid() == false ||
+ if (!module_spec.GetUUID().IsValid() ||
module_spec.GetUUID() == resolved_module_spec.GetUUID()) {
got_module_spec = true;
}
}
}
- if (module_spec.GetArchitecture().IsValid() == false) {
+ if (!module_spec.GetArchitecture().IsValid()) {
Status error;
// No valid architecture was specified, ask the platform for the
// architectures that we should be using (in the correct order) and see if
@@ -1616,7 +1616,7 @@ Status Platform::GetRemoteSharedModule(c
// Get module information from a target.
if (!GetModuleSpec(module_spec.GetFileSpec(), module_spec.GetArchitecture(),
resolved_module_spec)) {
- if (module_spec.GetUUID().IsValid() == false ||
+ if (!module_spec.GetUUID().IsValid() ||
module_spec.GetUUID() == resolved_module_spec.GetUUID()) {
return module_resolver(module_spec);
}
Modified: lldb/trunk/source/Target/QueueItem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/QueueItem.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Target/QueueItem.cpp (original)
+++ lldb/trunk/source/Target/QueueItem.cpp Fri Dec 14 16:15:33 2018
@@ -94,7 +94,7 @@ std::string QueueItem::GetQueueLabel() {
ProcessSP QueueItem::GetProcessSP() { return m_process_wp.lock(); }
void QueueItem::FetchEntireItem() {
- if (m_have_fetched_entire_item == true)
+ if (m_have_fetched_entire_item)
return;
ProcessSP process_sp = m_process_wp.lock();
if (process_sp) {
Modified: lldb/trunk/source/Target/RegisterNumber.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/RegisterNumber.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Target/RegisterNumber.cpp (original)
+++ lldb/trunk/source/Target/RegisterNumber.cpp Fri Dec 14 16:15:33 2018
@@ -61,26 +61,15 @@ bool RegisterNumber::operator==(Register
return false;
if (m_kind == rhs.m_kind) {
- if (m_regnum == rhs.m_regnum)
- return true;
- else
- return false;
+ return m_regnum == rhs.m_regnum;
}
uint32_t rhs_regnum = rhs.GetAsKind(m_kind);
if (rhs_regnum != LLDB_INVALID_REGNUM) {
- if (m_regnum == rhs_regnum)
- return true;
- else
- return false;
+ return m_regnum == rhs_regnum;
}
uint32_t lhs_regnum = GetAsKind(rhs.m_kind);
- {
- if (lhs_regnum == rhs.m_regnum)
- return true;
- else
- return false;
- }
+ { return lhs_regnum == rhs.m_regnum; }
return false;
}
Modified: lldb/trunk/source/Target/StackFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrame.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrame.cpp (original)
+++ lldb/trunk/source/Target/StackFrame.cpp Fri Dec 14 16:15:33 2018
@@ -1079,9 +1079,9 @@ bool StackFrame::GetFrameBaseValue(Scala
m_sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress(
exe_ctx.GetTargetPtr());
- if (m_sc.function->GetFrameBaseExpression().Evaluate(
+ if (!m_sc.function->GetFrameBaseExpression().Evaluate(
&exe_ctx, nullptr, loclist_base_addr, nullptr, nullptr,
- expr_value, &m_frame_base_error) == false) {
+ expr_value, &m_frame_base_error)) {
// We should really have an error if evaluate returns, but in case we
// don't, lets set the error to something at least.
if (m_frame_base_error.Success())
Modified: lldb/trunk/source/Target/StopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StopInfo.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Target/StopInfo.cpp (original)
+++ lldb/trunk/source/Target/StopInfo.cpp Fri Dec 14 16:15:33 2018
@@ -542,9 +542,9 @@ protected:
__FUNCTION__, m_value);
}
- if ((m_should_stop == false || internal_breakpoint)
- && thread_sp->CompletedPlanOverridesBreakpoint()) {
-
+ if ((!m_should_stop || internal_breakpoint) &&
+ thread_sp->CompletedPlanOverridesBreakpoint()) {
+
// Override should_stop decision when we have completed step plan
// additionally to the breakpoint
m_should_stop = true;
Modified: lldb/trunk/source/Target/TargetList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Fri Dec 14 16:15:33 2018
@@ -234,7 +234,7 @@ Status TargetList::CreateTargetInternal(
// All platforms for all modules in the executable match, so we can
// select this platform
platform_sp = platforms.front();
- } else if (more_than_one_platforms == false) {
+ } else if (!more_than_one_platforms) {
// No platforms claim to support this file
error.SetErrorString("No matching platforms found for this file, "
"specify one with the --platform option");
Modified: lldb/trunk/source/Target/ThreadPlanBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanBase.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanBase.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanBase.cpp Fri Dec 14 16:15:33 2018
@@ -57,10 +57,7 @@ bool ThreadPlanBase::ValidatePlan(Stream
bool ThreadPlanBase::DoPlanExplainsStop(Event *event_ptr) {
// The base plan should defer to its tracer, since by default it always
// handles the stop.
- if (TracerExplainsStop())
- return false;
- else
- return true;
+ return !TracerExplainsStop();
}
Vote ThreadPlanBase::ShouldReportStop(Event *event_ptr) {
Modified: lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp Fri Dec 14 16:15:33 2018
@@ -123,10 +123,7 @@ bool ThreadPlanStepOverRange::IsEquivale
}
}
// Fall back to symbol if we have no decision from comp_unit/function/block.
- if (m_addr_context.symbol && m_addr_context.symbol == context.symbol) {
- return true;
- }
- return false;
+ return m_addr_context.symbol && m_addr_context.symbol == context.symbol;
}
bool ThreadPlanStepOverRange::ShouldStop(Event *event_ptr) {
Modified: lldb/trunk/source/Utility/ArchSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ArchSpec.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Utility/ArchSpec.cpp (original)
+++ lldb/trunk/source/Utility/ArchSpec.cpp Fri Dec 14 16:15:33 2018
@@ -610,10 +610,8 @@ const char *ArchSpec::GetArchitectureNam
bool ArchSpec::IsMIPS() const {
const llvm::Triple::ArchType machine = GetMachine();
- if (machine == llvm::Triple::mips || machine == llvm::Triple::mipsel ||
- machine == llvm::Triple::mips64 || machine == llvm::Triple::mips64el)
- return true;
- return false;
+ return machine == llvm::Triple::mips || machine == llvm::Triple::mipsel ||
+ machine == llvm::Triple::mips64 || machine == llvm::Triple::mips64el;
}
std::string ArchSpec::GetTargetABI() const {
@@ -1096,9 +1094,7 @@ bool ArchSpec::IsEqualTo(const ArchSpec
const llvm::Triple::EnvironmentType rhs_triple_env =
rhs_triple.getEnvironment();
- if (!IsCompatibleEnvironment(lhs_triple_env, rhs_triple_env))
- return false;
- return true;
+ return IsCompatibleEnvironment(lhs_triple_env, rhs_triple_env);
}
return false;
}
Modified: lldb/trunk/source/Utility/Listener.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Listener.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Utility/Listener.cpp (original)
+++ lldb/trunk/source/Utility/Listener.cpp Fri Dec 14 16:15:33 2018
@@ -251,9 +251,7 @@ public:
return false;
}
- if (m_event_type_mask == 0 || m_event_type_mask & event_sp->GetType())
- return true;
- return false;
+ return m_event_type_mask == 0 || m_event_type_mask & event_sp->GetType();
}
private:
Modified: lldb/trunk/source/Utility/RegisterValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/RegisterValue.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Utility/RegisterValue.cpp (original)
+++ lldb/trunk/source/Utility/RegisterValue.cpp Fri Dec 14 16:15:33 2018
@@ -475,7 +475,7 @@ bool RegisterValue::SignExtend(uint32_t
bool RegisterValue::CopyValue(const RegisterValue &rhs) {
if (this == &rhs)
- return rhs.m_type == eTypeInvalid ? false : true;
+ return rhs.m_type != eTypeInvalid;
m_type = rhs.m_type;
switch (m_type) {
Modified: lldb/trunk/source/Utility/StructuredData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StructuredData.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/source/Utility/StructuredData.cpp (original)
+++ lldb/trunk/source/Utility/StructuredData.cpp Fri Dec 14 16:15:33 2018
@@ -226,7 +226,7 @@ void StructuredData::Float::Dump(Stream
}
void StructuredData::Boolean::Dump(Stream &s, bool pretty_print) const {
- if (m_value == true)
+ if (m_value)
s.PutCString("true");
else
s.PutCString("false");
Modified: lldb/trunk/tools/debugserver/source/JSONGenerator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/JSONGenerator.h?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/JSONGenerator.h (original)
+++ lldb/trunk/tools/debugserver/source/JSONGenerator.h Fri Dec 14 16:15:33 2018
@@ -182,7 +182,7 @@ public:
void SetValue(bool value) { m_value = value; }
void Dump(std::ostream &s) const override {
- if (m_value == true)
+ if (m_value)
s << "true";
else
s << "false";
@@ -262,7 +262,7 @@ public:
s << "{";
for (collection::const_iterator iter = m_dict.begin();
iter != m_dict.end(); ++iter) {
- if (have_printed_one_elem == false) {
+ if (!have_printed_one_elem) {
have_printed_one_elem = true;
} else {
s << ",";
Modified: lldb/trunk/tools/debugserver/source/MacOSX/Genealogy.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/Genealogy.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/Genealogy.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/Genealogy.cpp Fri Dec 14 16:15:33 2018
@@ -74,8 +74,7 @@ Genealogy::GetGenealogyInfoForThread(pid
// (else we'll need to hit the timeout for every thread we're asked about.)
// We'll try again at the next public stop.
- if (m_thread_activities.size() == 0 &&
- m_diagnosticd_call_timed_out == false) {
+ if (m_thread_activities.size() == 0 && !m_diagnosticd_call_timed_out) {
GetActivities(pid, thread_list, task);
}
std::map<nub_thread_t, ThreadActivitySP>::const_iterator search;
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm Fri Dec 14 16:15:33 2018
@@ -783,8 +783,8 @@ JSONGenerator::ObjectSP MachProcess::For
uuid_unparse_upper(image_infos[i].macho_info.uuid, uuidstr);
image_info_dict_sp->AddStringItem("uuid", uuidstr);
- if (image_infos[i].macho_info.min_version_os_name.empty() == false &&
- image_infos[i].macho_info.min_version_os_version.empty() == false) {
+ if (!image_infos[i].macho_info.min_version_os_name.empty() &&
+ !image_infos[i].macho_info.min_version_os_version.empty()) {
image_info_dict_sp->AddStringItem(
"min_version_os_name", image_infos[i].macho_info.min_version_os_name);
image_info_dict_sp->AddStringItem(
@@ -1602,7 +1602,7 @@ nub_size_t MachProcess::WriteMemory(nub_
void MachProcess::ReplyToAllExceptions() {
PTHREAD_MUTEX_LOCKER(locker, m_exception_messages_mutex);
- if (m_exception_messages.empty() == false) {
+ if (!m_exception_messages.empty()) {
MachException::Message::iterator pos;
MachException::Message::iterator begin = m_exception_messages.begin();
MachException::Message::iterator end = m_exception_messages.end();
@@ -1774,7 +1774,7 @@ bool MachProcess::DisableBreakpoint(nub_
if (bp->IsHardware()) {
bool hw_disable_result = m_thread_list.DisableHardwareBreakpoint(bp);
- if (hw_disable_result == true) {
+ if (hw_disable_result) {
bp->SetEnabled(false);
// Let the thread list know that a breakpoint has been modified
if (remove) {
@@ -1909,7 +1909,7 @@ bool MachProcess::DisableWatchpoint(nub_
if (wp->IsHardware()) {
bool hw_disable_result = m_thread_list.DisableHardwareWatchpoint(wp);
- if (hw_disable_result == true) {
+ if (hw_disable_result) {
wp->SetEnabled(false);
if (remove)
m_watchpoints.Remove(addr);
@@ -2179,7 +2179,7 @@ task_t MachProcess::ExceptionMessageBund
m_thread_list.Dump();
bool step_more = false;
- if (m_thread_list.ShouldStop(step_more) && auto_resume == false) {
+ if (m_thread_list.ShouldStop(step_more) && !auto_resume) {
// Wait for the eEventProcessRunningStateChanged event to be reset
// before changing state to stopped to avoid race condition with
// very fast start/stops
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp Fri Dec 14 16:15:33 2018
@@ -83,7 +83,7 @@ bool MachThread::SetSuspendCountBeforeRe
DNBLogThreadedIf(LOG_THREAD | LOG_VERBOSE, "MachThread::%s ( )",
__FUNCTION__);
DNBError err;
- if (MachPortNumberIsValid(m_mach_port_number) == false)
+ if (!MachPortNumberIsValid(m_mach_port_number))
return false;
integer_t times_to_resume;
@@ -121,7 +121,7 @@ bool MachThread::RestoreSuspendCountAfte
DNBLogThreadedIf(LOG_THREAD | LOG_VERBOSE, "MachThread::%s ( )",
__FUNCTION__);
DNBError err;
- if (MachPortNumberIsValid(m_mach_port_number) == false)
+ if (!MachPortNumberIsValid(m_mach_port_number))
return false;
if (m_suspend_count > 0) {
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachVMRegion.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachVMRegion.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachVMRegion.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachVMRegion.cpp Fri Dec 14 16:15:33 2018
@@ -166,10 +166,7 @@ bool MachVMRegion::GetRegionForAddress(n
// doesn't mean that "addr" is in the range. The data in this object will
// be valid though, so you could see where the next region begins. So we
// return false, yet leave "m_err" with a successfull return code.
- if ((addr < m_start) || (addr >= (m_start + m_size)))
- return false;
-
- return true;
+ return !((addr < m_start) || (addr >= (m_start + m_size)));
}
uint32_t MachVMRegion::GetDNBPermissions() const {
Modified: lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp Fri Dec 14 16:15:33 2018
@@ -889,10 +889,7 @@ bool DNBArchImplI386::RollbackTransForHW
LOG_WATCHPOINTS,
"DNBArchImplI386::RollbackTransForHWP() SetDBGState() => 0x%8.8x.", kret);
- if (kret == KERN_SUCCESS)
- return true;
- else
- return false;
+ return kret == KERN_SUCCESS;
}
bool DNBArchImplI386::FinishTransForHWP() {
m_2pc_trans_state = Trans_Done;
@@ -918,7 +915,7 @@ uint32_t DNBArchImplI386::EnableHardware
return INVALID_NUB_HW_INDEX;
// We must watch for either read or write
- if (read == false && write == false)
+ if (!read && !write)
return INVALID_NUB_HW_INDEX;
// Read the debug state
Modified: lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp Fri Dec 14 16:15:33 2018
@@ -844,10 +844,7 @@ bool DNBArchImplX86_64::RollbackTransFor
"DNBArchImplX86_64::RollbackTransForHWP() SetDBGState() => 0x%8.8x.",
kret);
- if (kret == KERN_SUCCESS)
- return true;
- else
- return false;
+ return kret == KERN_SUCCESS;
}
bool DNBArchImplX86_64::FinishTransForHWP() {
m_2pc_trans_state = Trans_Done;
@@ -873,7 +870,7 @@ uint32_t DNBArchImplX86_64::EnableHardwa
return INVALID_NUB_HW_INDEX;
// We must watch for either read or write
- if (read == false && write == false)
+ if (!read && !write)
return INVALID_NUB_HW_INDEX;
// Read the debug state
Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Fri Dec 14 16:15:33 2018
@@ -3413,10 +3413,7 @@ static bool RNBRemoteShouldCancelCallbac
RNBRemoteSP remoteSP(g_remoteSP);
if (remoteSP.get() != NULL) {
RNBRemote *remote = remoteSP.get();
- if (remote->Comm().IsConnected())
- return false;
- else
- return true;
+ return !remote->Comm().IsConnected();
}
return true;
}
@@ -3817,7 +3814,7 @@ rnb_err_t RNBRemote::HandlePacket_v(cons
attach_failed_due_to_sip = true;
}
- if (attach_failed_due_to_sip == false) {
+ if (!attach_failed_due_to_sip) {
int csops_flags = 0;
int retval = ::csops(pid_attaching_to, CS_OPS_STATUS, &csops_flags,
sizeof(csops_flags));
@@ -5300,7 +5297,7 @@ RNBRemote::GetJSONThreadsInfo(bool threa
thread_dict_sp->AddStringItem("reason", reason_value);
- if (threads_with_valid_stop_info_only == false) {
+ if (!threads_with_valid_stop_info_only) {
const char *thread_name = DNBThreadGetName(pid, tid);
if (thread_name && thread_name[0])
thread_dict_sp->AddStringItem("name", thread_name);
@@ -5488,7 +5485,7 @@ rnb_err_t RNBRemote::HandlePacket_jThrea
bool need_to_print_comma = false;
- if (thread_activity_sp && timed_out == false) {
+ if (thread_activity_sp && !timed_out) {
const Genealogy::Activity *activity =
&thread_activity_sp->current_activity;
bool need_vouchers_comma_sep = false;
Modified: lldb/trunk/tools/debugserver/source/RNBServices.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBServices.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBServices.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBServices.cpp Fri Dec 14 16:15:33 2018
@@ -57,9 +57,9 @@ int GetProcesses(CFMutableArrayRef plist
const pid_t pid = proc_info.kp_proc.p_pid;
// Skip zombie processes and processes with unset status
- if (kinfo_user_matches == false || // User is acceptable
- pid == our_pid || // Skip this process
- pid == 0 || // Skip kernel (kernel pid is zero)
+ if (!kinfo_user_matches || // User is acceptable
+ pid == our_pid || // Skip this process
+ pid == 0 || // Skip kernel (kernel pid is zero)
proc_info.kp_proc.p_stat ==
SZOMB || // Zombies are bad, they like brains...
proc_info.kp_proc.p_flag & P_TRACED || // Being debugged?
Modified: lldb/trunk/tools/debugserver/source/libdebugserver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/libdebugserver.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/libdebugserver.cpp (original)
+++ lldb/trunk/tools/debugserver/source/libdebugserver.cpp Fri Dec 14 16:15:33 2018
@@ -176,7 +176,7 @@ RNBRunLoopMode HandleProcessStateChange(
case eStateSuspended:
case eStateCrashed:
case eStateStopped:
- if (initialize == false) {
+ if (!initialize) {
// Compare the last stop count to our current notion of a stop count
// to make sure we don't notify more than once for a given stop.
nub_size_t prev_pid_stop_count = ctx.GetProcessStopCount();
Modified: lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp Fri Dec 14 16:15:33 2018
@@ -158,10 +158,7 @@ bool CMICmdArgValFile::IsFilePath(const
return false;
const bool bValidChars = IsValidChars(vrFileNamePath);
- if (bValidChars || bHavePosSlash || bHaveBckSlash)
- return true;
-
- return false;
+ return bValidChars || bHavePosSlash || bHaveBckSlash;
}
//++
Modified: lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp Fri Dec 14 16:15:33 2018
@@ -252,10 +252,7 @@ bool CMICmdArgValOptionLong::IsArgLongOp
return false;
const CMIUtilString strArg = vrTxt.substr(2);
- if (strArg.IsNumber())
- return false;
-
- return true;
+ return !strArg.IsNumber();
}
//++
Modified: lldb/trunk/tools/lldb-mi/MICmdArgValString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgValString.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdArgValString.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdArgValString.cpp Fri Dec 14 16:15:33 2018
@@ -33,7 +33,7 @@ CMICmdArgValString::CMICmdArgValString()
// Throws: None.
//--
CMICmdArgValString::CMICmdArgValString(const bool vbAnything)
- : m_bHandleQuotedString(vbAnything ? true : false), m_bAcceptNumbers(false),
+ : m_bHandleQuotedString(vbAnything), m_bAcceptNumbers(false),
m_bHandleDirPaths(false), m_bHandleAnything(vbAnything) {}
//++
@@ -391,8 +391,5 @@ bool CMICmdArgValString::IsStringArgQuot
return false;
const size_t nLen = vrTxt.length();
- if ((nLen > 5) && ((nPos + 2) == (nPos2 - 2)))
- return false;
-
- return true;
+ return !((nLen > 5) && ((nPos + 2) == (nPos2 - 2)));
}
Modified: lldb/trunk/tools/lldb-mi/MICmdArgValThreadGrp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgValThreadGrp.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdArgValThreadGrp.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdArgValThreadGrp.cpp Fri Dec 14 16:15:33 2018
@@ -115,10 +115,7 @@ bool CMICmdArgValThreadGrp::IsArgThreadG
return false;
const CMIUtilString strNum = vrTxt.substr(1);
- if (!strNum.IsNumber())
- return false;
-
- return true;
+ return strNum.IsNumber();
}
//++
Modified: lldb/trunk/tools/lldb-mi/MICmdFactory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdFactory.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdFactory.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdFactory.cpp Fri Dec 14 16:15:33 2018
@@ -128,10 +128,7 @@ bool CMICmdFactory::CmdRegister(const CM
bool CMICmdFactory::HaveAlready(const CMIUtilString &vMiCmd) const {
const MapMiCmdToCmdCreatorFn_t::const_iterator it =
m_mapMiCmdToCmdCreatorFn.find(vMiCmd);
- if (it != m_mapMiCmdToCmdCreatorFn.end())
- return true;
-
- return false;
+ return it != m_mapMiCmdToCmdCreatorFn.end();
}
//++
Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp Fri Dec 14 16:15:33 2018
@@ -532,7 +532,7 @@ bool CMICmnLLDBDebugSessionInfo::GetVari
const bool vbInSimpleForm,
CMIUtilString &vwrStrValue) {
const CMICmnLLDBUtilSBValue utilValue(vrValue, true, false);
- const bool bExpandAggregates = vbInSimpleForm ? false : true;
+ const bool bExpandAggregates = !vbInSimpleForm;
vwrStrValue = utilValue.GetValue(bExpandAggregates);
return MIstatus::success;
}
Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp Fri Dec 14 16:15:33 2018
@@ -437,10 +437,10 @@ bool CMICmnLLDBDebuggerHandleEvents::Han
sBrkPtInfo.m_nIgnore = brkPt.GetIgnoreCount();
sBrkPtInfo.m_bPending = false;
const char *pStrCondition = brkPt.GetCondition();
- sBrkPtInfo.m_bCondition = (pStrCondition != nullptr) ? true : false;
+ sBrkPtInfo.m_bCondition = pStrCondition != nullptr;
sBrkPtInfo.m_strCondition =
(pStrCondition != nullptr) ? pStrCondition : "??";
- sBrkPtInfo.m_bBrkPtThreadId = (brkPt.GetThreadID() != 0) ? true : false;
+ sBrkPtInfo.m_bBrkPtThreadId = brkPt.GetThreadID() != 0;
sBrkPtInfo.m_nBrkPtThreadId = brkPt.GetThreadID();
}
Modified: lldb/trunk/tools/lldb-mi/MICmnLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLog.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnLog.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLog.cpp Fri Dec 14 16:15:33 2018
@@ -209,10 +209,7 @@ bool CMICmnLog::RegisterMedium(const IMe
bool CMICmnLog::HaveMediumAlready(const IMedium &vrMedium) const {
IMedium *pMedium = const_cast<IMedium *>(&vrMedium);
const MapMediumToName_t::const_iterator it = m_mapMediumToName.find(pMedium);
- if (it != m_mapMediumToName.end())
- return true;
-
- return false;
+ return it != m_mapMediumToName.end();
}
//++
Modified: lldb/trunk/tools/lldb-mi/MIUtilMapIdToVariant.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIUtilMapIdToVariant.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIUtilMapIdToVariant.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MIUtilMapIdToVariant.cpp Fri Dec 14 16:15:33 2018
@@ -52,10 +52,7 @@ void CMIUtilMapIdToVariant::Clear() { m_
bool CMIUtilMapIdToVariant::HaveAlready(const CMIUtilString &vId) const {
const MapKeyToVariantValue_t::const_iterator it =
m_mapKeyToVariantValue.find(vId);
- if (it != m_mapKeyToVariantValue.end())
- return true;
-
- return false;
+ return it != m_mapKeyToVariantValue.end();
}
//++
Modified: lldb/trunk/tools/lldb-mi/MIUtilString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIUtilString.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIUtilString.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MIUtilString.cpp Fri Dec 14 16:15:33 2018
@@ -378,10 +378,7 @@ bool CMIUtilString::IsNumber() const {
return false;
const size_t nPos = find_first_not_of("-.0123456789");
- if (nPos != std::string::npos)
- return false;
-
- return true;
+ return nPos == std::string::npos;
}
//++
@@ -399,10 +396,7 @@ bool CMIUtilString::IsHexadecimalNumber(
// Skip '0x..' prefix
const size_t nPos = find_first_not_of("01234567890ABCDEFabcedf", 2);
- if (nPos != std::string::npos)
- return false;
-
- return true;
+ return nPos == std::string::npos;
}
//++
@@ -419,10 +413,7 @@ bool CMIUtilString::ExtractNumber(MIint6
vwrNumber = 0;
if (!IsNumber()) {
- if (ExtractNumberFromHexadecimal(vwrNumber))
- return true;
-
- return false;
+ return ExtractNumberFromHexadecimal(vwrNumber);
}
std::stringstream ss(const_cast<CMIUtilString &>(*this));
@@ -639,10 +630,7 @@ bool CMIUtilString::IsQuoted() const {
return false;
const size_t nLen = length();
- if ((nLen > 0) && (at(nLen - 1) != cQuote))
- return false;
-
- return true;
+ return !((nLen > 0) && (at(nLen - 1) != cQuote));
}
//++
Modified: lldb/trunk/tools/lldb-vscode/JSONUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/JSONUtils.cpp?rev=349215&r1=349214&r2=349215&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-vscode/JSONUtils.cpp (original)
+++ lldb/trunk/tools/lldb-vscode/JSONUtils.cpp Fri Dec 14 16:15:33 2018
@@ -97,9 +97,7 @@ int64_t GetSigned(const llvm::json::Obje
}
bool ObjectContainsKey(const llvm::json::Object &obj, llvm::StringRef key) {
- if (obj.find(key) != obj.end())
- return true;
- return false;
+ return obj.find(key) != obj.end();
}
std::vector<std::string> GetStrings(const llvm::json::Object *obj,
More information about the lldb-commits
mailing list