summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r--lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp30
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp2
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp30
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp4
-rw-r--r--lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp4
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp4
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp6
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp2
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp4
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp2
11 files changed, 46 insertions, 44 deletions
diff --git a/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp b/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
index 8856c54d3c9..18011cfb6b9 100644
--- a/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
+++ b/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
@@ -917,15 +917,15 @@ ValueObjectSP ABISysV_mips64::GetReturnValueObjectImpl(
uint32_t integer_bytes = 0;
// True if return values are in FP return registers.
- bool use_fp_regs = 0;
+ bool use_fp_regs = false;
// True if we found any non floating point field in structure.
- bool found_non_fp_field = 0;
+ bool found_non_fp_field = false;
// True if return values are in r2 register.
- bool use_r2 = 0;
+ bool use_r2 = false;
// True if return values are in r3 register.
- bool use_r3 = 0;
+ bool use_r3 = false;
// True if the result is copied into our data buffer
- bool sucess = 0;
+ bool sucess = false;
std::string name;
bool is_complex;
uint32_t count;
@@ -943,9 +943,9 @@ ValueObjectSP ABISysV_mips64::GetReturnValueObjectImpl(
nullptr, nullptr);
if (field_compiler_type.IsFloatingPointType(count, is_complex))
- use_fp_regs = 1;
+ use_fp_regs = true;
else
- found_non_fp_field = 1;
+ found_non_fp_field = true;
}
if (use_fp_regs && !found_non_fp_field) {
@@ -1059,20 +1059,20 @@ ValueObjectSP ABISysV_mips64::GetReturnValueObjectImpl(
// structure
integer_bytes = integer_bytes + *field_byte_width +
padding; // Increase the consumed bytes.
- use_r2 = 1;
+ use_r2 = true;
} else {
// There isn't enough space left in r2 for this field, so this
// will be in r3.
integer_bytes = integer_bytes + *field_byte_width +
padding; // Increase the consumed bytes.
- use_r3 = 1;
+ use_r3 = true;
}
}
// We already have consumed at-least 8 bytes that means r2 is done,
// and this field will be in r3. Check if this field can fit in r3.
else if (integer_bytes + *field_byte_width + padding <= 16) {
integer_bytes = integer_bytes + *field_byte_width + padding;
- use_r3 = 1;
+ use_r3 = true;
} else {
// There isn't any space left for this field, this should not
// happen as we have already checked the overall size is not
@@ -1085,10 +1085,10 @@ ValueObjectSP ABISysV_mips64::GetReturnValueObjectImpl(
// Vector types up to 16 bytes are returned in GP return registers
if (type_flags & eTypeIsVector) {
if (*byte_size <= 8)
- use_r2 = 1;
+ use_r2 = true;
else {
- use_r2 = 1;
- use_r3 = 1;
+ use_r2 = true;
+ use_r3 = true;
}
}
@@ -1100,7 +1100,7 @@ ValueObjectSP ABISysV_mips64::GetReturnValueObjectImpl(
error);
if (bytes_copied != r2_info->byte_size)
return return_valobj_sp;
- sucess = 1;
+ sucess = true;
}
if (use_r3) {
reg_ctx->ReadRegister(r3_info, r3_value);
@@ -1110,7 +1110,7 @@ ValueObjectSP ABISysV_mips64::GetReturnValueObjectImpl(
if (bytes_copied != r3_info->byte_size)
return return_valobj_sp;
- sucess = 1;
+ sucess = true;
}
if (sucess) {
// The result is in our data buffer. Create a variable object out of
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
index 5dc39e8dac4..526ef90782e 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
@@ -239,7 +239,7 @@ bool ASTResultSynthesizer::SynthesizeBodyResult(CompoundStmt *Body,
break;
last_expr = implicit_cast->getSubExpr();
- } while (0);
+ } while (false);
// is_lvalue is used to record whether the expression returns an assignable
// Lvalue or an Rvalue. This is relevant because they are handled
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
index 632594f1c46..e9dd73c5fa6 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
@@ -101,7 +101,7 @@ void ClangASTSource::InstallASTContext(clang::ASTContext &ast_context,
break;
sources.push_back(runtime_decl_vendor->GetImporterSource());
- } while (0);
+ } while (false);
do {
DeclVendor *modules_decl_vendor =
@@ -111,7 +111,7 @@ void ClangASTSource::InstallASTContext(clang::ASTContext &ast_context,
break;
sources.push_back(modules_decl_vendor->GetImporterSource());
- } while (0);
+ } while (false);
if (!is_shared_context) {
// Update the scratch AST context's merger to reflect any new sources we
@@ -125,7 +125,9 @@ void ClangASTSource::InstallASTContext(clang::ASTContext &ast_context,
sources.push_back({*scratch_ast_context->getASTContext(),
*scratch_ast_context->getFileManager(),
scratch_ast_context->GetOriginMap()});
- } while (0);
+ }
+ while (false)
+ ;
m_merger_up =
llvm::make_unique<clang::ExternalASTMerger>(target, sources);
@@ -934,7 +936,7 @@ void ClangASTSource::FindExternalVisibleDecls(
context.m_found.type = true;
}
}
- } while (0);
+ } while (false);
}
if (!context.m_found.type) {
@@ -985,10 +987,10 @@ void ClangASTSource::FindExternalVisibleDecls(
}
context.AddNamedDecl(copied_named_decl);
- } while (0);
+ } while (false);
}
- } while (0);
+ } while (false);
}
template <class D> class TaggedASTDecl {
@@ -1173,7 +1175,7 @@ void ClangASTSource::FindObjCMethodDecls(NameSearchContext &context) {
if (FindObjCMethodDeclsWithOrigin(current_id, context,
original_interface_decl, "at origin"))
return; // found it, no need to look any further
- } while (0);
+ } while (false);
StreamString ss;
@@ -1278,7 +1280,7 @@ void ClangASTSource::FindObjCMethodDecls(NameSearchContext &context) {
if (*cursor == ' ' || *cursor == '(')
sc_list.Append(candidate_sc);
}
- } while (0);
+ } while (false);
if (sc_list.GetSize()) {
// We found a good function symbol. Use that.
@@ -1361,7 +1363,7 @@ void ClangASTSource::FindObjCMethodDecls(NameSearchContext &context) {
"in debug info");
return;
- } while (0);
+ } while (false);
do {
// Check the modules only if the debug information didn't have a complete
@@ -1388,7 +1390,7 @@ void ClangASTSource::FindObjCMethodDecls(NameSearchContext &context) {
current_id, context, interface_decl_from_modules, "in modules"))
return;
}
- } while (0);
+ } while (false);
do {
// Check the runtime only if the debug information didn't have a complete
@@ -1425,7 +1427,7 @@ void ClangASTSource::FindObjCMethodDecls(NameSearchContext &context) {
FindObjCMethodDeclsWithOrigin(current_id, context, runtime_interface_decl,
"in runtime");
- } while (0);
+ } while (false);
}
static bool FindObjCPropertyAndIvarDeclsWithOrigin(
@@ -1544,7 +1546,7 @@ void ClangASTSource::FindObjCPropertyAndIvarDecls(NameSearchContext &context) {
complete_iface_decl);
return;
- } while (0);
+ } while (false);
do {
// Check the modules only if the debug information didn't have a complete
@@ -1580,7 +1582,7 @@ void ClangASTSource::FindObjCPropertyAndIvarDecls(NameSearchContext &context) {
if (FindObjCPropertyAndIvarDeclsWithOrigin(current_id, context, *this,
interface_decl_from_modules))
return;
- } while (0);
+ } while (false);
do {
// Check the runtime only if the debug information didn't have a complete
@@ -1625,7 +1627,7 @@ void ClangASTSource::FindObjCPropertyAndIvarDecls(NameSearchContext &context) {
if (FindObjCPropertyAndIvarDeclsWithOrigin(
current_id, context, *this, interface_decl_from_runtime))
return;
- } while (0);
+ } while (false);
}
typedef llvm::DenseMap<const FieldDecl *, uint64_t> FieldOffsetMap;
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
index 496d5b40e3e..c2ebfe9ce4e 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
@@ -927,7 +927,7 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls(
name.GetCString());
context.AddNamedDecl(parser_named_decl);
- } while (0);
+ } while (false);
}
if (name.GetCString()[0] == '$' && !namespace_decl) {
@@ -1562,7 +1562,7 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls(
context.m_found.variable = true;
}
}
- } while (0);
+ } while (false);
}
if (target && !context.m_found.variable && !namespace_decl) {
diff --git a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
index d835d62ad2e..d7e8e049134 100644
--- a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
+++ b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
@@ -657,10 +657,10 @@ bool EmulateInstructionARM64::EmulateADDSUBImm(const uint32_t opcode) {
if (sub_op) {
operand2 = NOT(operand2);
- carry_in = 1;
+ carry_in = true;
imm = -imm; // For the Register plug offset context below
} else {
- carry_in = 0;
+ carry_in = false;
}
ProcState proc_state;
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
index 0e26de569e8..93aa07f8916 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
@@ -334,9 +334,9 @@ bool ClassDescriptorV2::Describe(
std::unique_ptr<class_rw_t> class_rw;
if (!Read_objc_class(process, objc_class))
- return 0;
+ return false;
if (!Read_class_row(process, *objc_class, class_ro, class_rw))
- return 0;
+ return false;
static ConstString NSObject_name("NSObject");
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
index b5cac92213b..501114ad028 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
@@ -62,7 +62,7 @@ public:
non_const_interface_decl->lookup(name);
return (result.size() != 0);
- } while (0);
+ } while (false);
SetNoExternalVisibleDeclsForName(decl_ctx, name);
return false;
@@ -208,7 +208,7 @@ public:
uint32_t stepsLeft = 256;
- while (1) {
+ while (true) {
if (--stepsLeft == 0) {
m_is_valid = false;
return;
@@ -647,7 +647,7 @@ AppleObjCDeclVendor::FindDecls(ConstString name, bool append,
decls.push_back(iface_decl);
ret++;
break;
- } while (0);
+ } while (false);
return ret;
}
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 62991dc2095..42c14aa9f50 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -5038,7 +5038,7 @@ ObjectFileMachO::GetArchitecture(const llvm::MachO::mach_header &header,
triple.setEnvironmentName(os_env.environment);
return arch;
}
- } while (0);
+ } while (false);
offset = cmd_offset + load_cmd.cmdsize;
}
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index ded0983fac7..1a75326f3b2 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -87,7 +87,7 @@ bool CommunicationKDP::SendRequestAndGetReply(
for (uint32_t i = 0; i < num_retries; ++i) {
if (SendRequestPacketNoLock(request_packet)) {
const uint8_t request_sequence_id = (uint8_t)request_packet.GetData()[1];
- while (1) {
+ while (true) {
if (WaitForPacketWithTimeoutMicroSecondsNoLock(
reply_packet,
std::chrono::microseconds(GetPacketTimeout()).count())) {
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index def7eb2e1eb..b3c93678615 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2664,7 +2664,7 @@ bool DWARFASTParserClang::ParseChildMembers(
DelayedPropertyList &delayed_properties, AccessType &default_accessibility,
bool &is_a_class, ClangASTImporter::LayoutInfo &layout_info) {
if (!parent_die)
- return 0;
+ return false;
// Get the parent byte size so we can verify any members will fit
const uint64_t parent_byte_size =
@@ -2679,7 +2679,7 @@ bool DWARFASTParserClang::ParseChildMembers(
ClangASTContext *ast =
llvm::dyn_cast_or_null<ClangASTContext>(class_clang_type.GetTypeSystem());
if (ast == nullptr)
- return 0;
+ return false;
for (DWARFDIE die = parent_die.GetFirstChild(); die.IsValid();
die = die.GetSibling()) {
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index c692e8bf18d..2871017baec 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2104,7 +2104,7 @@ bool SymbolFileDWARF::ResolveFunction(const DWARFDIE &orig_die,
if (die.Tag() == DW_TAG_inlined_subroutine) {
inlined_die = die;
- while (1) {
+ while (true) {
die = die.GetParent();
if (die) {
OpenPOWER on IntegriCloud