summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp12
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp11
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp4
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp11
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp2
6 files changed, 17 insertions, 25 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index af3c3b4b410..0b71b2a4b87 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -657,7 +657,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc,
}
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::ParseTypeFromDWARF(const SymbolContext &sc,
// 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::ParseTypeFromDWARF(const SymbolContext &sc,
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::CompleteTypeFromDWARF(const DWARFDIE &die,
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::ParseChildMembers(
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::ParseChildMembers(
}
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 "
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp
index 1c31d1c4259..d79acdc5cfc 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp
@@ -25,7 +25,7 @@ DWARFDebugMacroHeader::ParseHeader(const DWARFDataExtractor &debug_macro_data,
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)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
index 89be3d6c014..57d2be93c44 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
@@ -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_attributes_are_invalid() {
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
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 39dfe31cbda..eafdea4eb71 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -1679,7 +1679,7 @@ void SymbolFileDWARF::UpdateExternalModuleListIfNeeded() {
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(const DWARFDIE &orig_die,
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;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index fa6ace8c3bb..d931ccb9d10 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -89,7 +89,7 @@ SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(
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::FindCompleteObjCDefinitionTypeForDIE(
// 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::FindTypes(
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;
});
}
diff --git a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
index 37757578bdb..65e718bedaf 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
@@ -658,7 +658,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) {
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 {
OpenPOWER on IntegriCloud