diff options
Diffstat (limited to 'lldb/source')
25 files changed, 44 insertions, 29 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index cfb28b2d6f2..501771816aa 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -15,6 +15,7 @@ // C++ Includes // Other libraries and framework includes #include "clang/AST/Decl.h" + // Project includes #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" @@ -41,6 +42,8 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Thread.h" +#include "lldb-private.h" + using namespace lldb; using namespace lldb_private; @@ -488,7 +491,7 @@ protected: { case '*': ++pointer_count; - // fall through... + LLVM_FALLTHROUGH; case ' ': case '\t': type_str.erase(type_str.size()-1); diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp index a12d651bdf6..5b0dc037ca7 100644 --- a/lldb/source/Core/Address.cpp +++ b/lldb/source/Core/Address.cpp @@ -448,7 +448,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum else s->Printf("%s[","<Unknown>"); } - // Fall through + LLVM_FALLTHROUGH; case DumpStyleFileAddress: { addr_t file_addr = GetFileAddress(); diff --git a/lldb/source/Core/AddressRange.cpp b/lldb/source/Core/AddressRange.cpp index ac64833884e..072c2450836 100644 --- a/lldb/source/Core/AddressRange.cpp +++ b/lldb/source/Core/AddressRange.cpp @@ -163,7 +163,7 @@ AddressRange::Dump(Stream *s, Target *target, Address::DumpStyle style, Address: case Address::DumpStyleModuleWithFileAddress: show_module = true; - // fall through + LLVM_FALLTHROUGH; case Address::DumpStyleFileAddress: vmaddr = m_base_addr.GetFileAddress(); break; diff --git a/lldb/source/Core/ArchSpec.cpp b/lldb/source/Core/ArchSpec.cpp index ffe717f29c4..6fdc6b666a4 100644 --- a/lldb/source/Core/ArchSpec.cpp +++ b/lldb/source/Core/ArchSpec.cpp @@ -1050,7 +1050,7 @@ cores_match (const ArchSpec::Core core1, const ArchSpec::Core core2, bool try_in case ArchSpec::eCore_arm_generic: if (enforce_exact_match) break; - // Fall through to case below + LLVM_FALLTHROUGH; case ArchSpec::kCore_arm_any: if (core2 >= ArchSpec::kCore_arm_first && core2 <= ArchSpec::kCore_arm_last) return true; diff --git a/lldb/source/Core/Communication.cpp b/lldb/source/Core/Communication.cpp index ae579d1b00a..65140353eb8 100644 --- a/lldb/source/Core/Communication.cpp +++ b/lldb/source/Core/Communication.cpp @@ -403,7 +403,7 @@ Communication::ReadThread (lldb::thread_arg_t p) case eConnectionStatusNoConnection: // No connection case eConnectionStatusLostConnection: // Lost connection while connected to a valid connection done = true; - // Fall through... + LLVM_FALLTHROUGH; case eConnectionStatusTimedOut: // Request timed out if (log) error.LogIfError (log, diff --git a/lldb/source/Core/CxaDemangle.cpp b/lldb/source/Core/CxaDemangle.cpp index 7d21138c289..409f404441c 100644 --- a/lldb/source/Core/CxaDemangle.cpp +++ b/lldb/source/Core/CxaDemangle.cpp @@ -22,6 +22,8 @@ #include "llvm/Support/Compiler.h" // LLVM_{NOEXCEPT, CONSTEXPR, ALIGNAS} #undef _LIBCPP_EXTERN_TEMPLATE // Avoid warning below +#include "lldb/lldb-private.h" + //===-------------------------- cxa_demangle.cpp --------------------------===// // // The LLVM Compiler Infrastructure @@ -2262,7 +2264,7 @@ parse_type(const char* first, const char* last, C& db) break; } } - // drop through + LLVM_FALLTHROUGH; default: // must check for builtin-types before class-enum-types to avoid // ambiguities with operator-names diff --git a/lldb/source/Core/FastDemangle.cpp b/lldb/source/Core/FastDemangle.cpp index a27a2f1dbff..c46fb953dda 100644 --- a/lldb/source/Core/FastDemangle.cpp +++ b/lldb/source/Core/FastDemangle.cpp @@ -11,6 +11,8 @@ #include <string.h> #include <stdlib.h> +#include "lldb/lldb-private.h" + //#define DEBUG_FAILURES 1 //#define DEBUG_SUBSTITUTIONS 1 //#define DEBUG_TEMPLATE_ARGS 1 @@ -1627,7 +1629,7 @@ private: return Parse('E'); } --m_read_ptr; - // fallthrough + LLVM_FALLTHROUGH; case 'w': case 'c': case 'a': @@ -1827,7 +1829,7 @@ private: if (*m_read_ptr++ == 'r') return ParseUnresolvedName(); --m_read_ptr; - // fallthrough + LLVM_FALLTHROUGH; default: return ParseExpressionPrimary(); } @@ -2099,7 +2101,7 @@ private: } case 'L': ++m_read_ptr; - // fallthrough + LLVM_FALLTHROUGH; default: { if (!ParseUnscopedName(name_state)) @@ -2293,7 +2295,7 @@ private: m_read_ptr += strlen(m_read_ptr); break; } - // fallthrough + LLVM_FALLTHROUGH; default: if (first_param) first_param = false; diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp index 804682f64bd..7226a4f57ff 100644 --- a/lldb/source/Core/FormatEntity.cpp +++ b/lldb/source/Core/FormatEntity.cpp @@ -751,7 +751,7 @@ DumpValue (Stream &s, case FormatEntity::Entry::Type::ScriptVariableSynthetic: is_script = true; - // Fall through + LLVM_FALLTHROUGH; case FormatEntity::Entry::Type::VariableSynthetic: custom_format = entry.fmt; val_obj_display = (ValueObject::ValueObjectRepresentationStyle)entry.number; diff --git a/lldb/source/Expression/REPL.cpp b/lldb/source/Expression/REPL.cpp index 1727a13abd0..850099cb4a4 100644 --- a/lldb/source/Expression/REPL.cpp +++ b/lldb/source/Expression/REPL.cpp @@ -410,7 +410,7 @@ REPL::IOHandlerInputComplete (IOHandler &io_handler, std::string &code) case lldb::eExpressionSetupError: case lldb::eExpressionParseError: add_to_code = false; - // Fall through + LLVM_FALLTHROUGH; case lldb::eExpressionDiscarded: error_sp->Printf("%s\n", error.AsCString()); break; diff --git a/lldb/source/Interpreter/OptionValueArray.cpp b/lldb/source/Interpreter/OptionValueArray.cpp index aabe457534d..348414f432c 100644 --- a/lldb/source/Interpreter/OptionValueArray.cpp +++ b/lldb/source/Interpreter/OptionValueArray.cpp @@ -316,6 +316,7 @@ OptionValueArray::SetArgs (const Args &args, VarSetOperationType op) case eVarSetOperationAssign: m_values.clear(); // Fall through to append case + LLVM_FALLTHROUGH; case eVarSetOperationAppend: for (size_t i=0; i<argc; ++i) { diff --git a/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp b/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp index 669d3ee33ac..6a0ba11b676 100644 --- a/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp +++ b/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp @@ -88,6 +88,7 @@ OptionValueFileSpecList::SetValueFromString (llvm::StringRef value, VarSetOperat case eVarSetOperationAssign: m_current_value.Clear(); // Fall through to append case + LLVM_FALLTHROUGH; case eVarSetOperationAppend: if (argc > 0) { diff --git a/lldb/source/Interpreter/OptionValuePathMappings.cpp b/lldb/source/Interpreter/OptionValuePathMappings.cpp index 722d6a14427..b0d460a8ca2 100644 --- a/lldb/source/Interpreter/OptionValuePathMappings.cpp +++ b/lldb/source/Interpreter/OptionValuePathMappings.cpp @@ -85,6 +85,7 @@ OptionValuePathMappings::SetValueFromString (llvm::StringRef value, VarSetOperat } m_path_mappings.Clear(m_notify_changes); // Fall through to append case + LLVM_FALLTHROUGH; case eVarSetOperationAppend: if (argc < 2 || (argc & 1)) { diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp index db751269700..f99ebd26f90 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -295,7 +295,7 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope, case lldb::eLanguageTypeC_plus_plus_14: m_compiler->getLangOpts().CPlusPlus11 = true; m_compiler->getHeaderSearchOpts().UseLibcxx = true; - // fall thru ... + LLVM_FALLTHROUGH; case lldb::eLanguageTypeC_plus_plus_03: m_compiler->getLangOpts().CPlusPlus = true; // FIXME: the following language option is a temporary workaround, diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index c9f209e2c0f..5d4c2178211 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -4090,7 +4090,7 @@ ObjectFileMachO::ParseSymtab () case N_ECOML: // end common (local name): 0,,n_sect,0,address symbol_section = section_info.GetSection (nlist.n_sect, nlist.n_value); - // Fall through + LLVM_FALLTHROUGH; case N_ECOMM: // end common: name,,n_sect,0,0 @@ -4146,7 +4146,8 @@ ObjectFileMachO::ParseSymtab () ConstString undefined_name(symbol_name + ((symbol_name[0] == '_') ? 1 : 0)); undefined_name_to_desc[undefined_name] = nlist.n_desc; } - // Fall through + LLVM_FALLTHROUGH; + case N_PBUD: type = eSymbolTypeUndefined; break; diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index fb38630710a..36096c99e71 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -611,7 +611,8 @@ PlatformDarwin::GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite break; case llvm::Triple::thumb: - bp_is_thumb = true; // Fall through... + bp_is_thumb = true; + LLVM_FALLTHROUGH; case llvm::Triple::arm: { static const uint8_t g_arm_breakpoint_opcode[] = { 0xFE, 0xDE, 0xFF, 0xE7 }; diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp index 5c1c3284a35..2cbd94a2f96 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp @@ -326,6 +326,7 @@ CommunicationKDP::CheckForPacket (const uint8_t *src, size_t src_len, DataExtrac SendRequestPacketNoLock (request_ack_packet); } // Fall through to case below to get packet contents + LLVM_FALLTHROUGH; case ePacketTypeReply | KDP_CONNECT: case ePacketTypeReply | KDP_DISCONNECT: case ePacketTypeReply | KDP_HOSTINFO: diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index 2ea1f206008..891cc22fec7 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -845,7 +845,7 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri case '%': // Async notify packet isNotifyPacket = true; - // Intentional fall through + LLVM_FALLTHROUGH; case '$': // Look for a standard gdb packet? diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 9cb0b3e50d4..da04d48910e 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -4418,7 +4418,7 @@ GDBRemoteCommunicationClient::ReadExtFeature (const lldb_private::ConstString ob // last chunk case ( 'l' ): active = false; - // fall through intentional + LLVM_FALLTHROUGH; // more chunks case ( 'm' ) : diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 921369c7ef2..0274aa89acc 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -1367,7 +1367,7 @@ GDBRemoteCommunicationServerLLGS::Handle_vCont (StringExtractorGDBRemote &packet thread_action.signal = packet.GetHexMaxU32 (false, 0); if (thread_action.signal == 0) return SendIllFormedResponse (packet, "Could not parse signal in vCont packet C action"); - // Fall through to next case... + LLVM_FALLTHROUGH; case 'c': // Continue @@ -1378,7 +1378,7 @@ GDBRemoteCommunicationServerLLGS::Handle_vCont (StringExtractorGDBRemote &packet thread_action.signal = packet.GetHexMaxU32 (false, 0); if (thread_action.signal == 0) return SendIllFormedResponse (packet, "Could not parse signal in vCont packet S action"); - // Fall through to next case... + LLVM_FALLTHROUGH; case 's': // Step diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index 0bfd354b52b..358febc4b32 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -345,6 +345,7 @@ DWARFASTParserClang::ParseTypeFromDWARF (const SymbolContext& sc, break; } // Fall through to base type below in case we can handle the type there... + LLVM_FALLTHROUGH; case DW_TAG_base_type: resolve_state = Type::eResolveStateFull; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp index 1758f3a7946..cc2124ff331 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp @@ -942,7 +942,7 @@ DWARFDebugInfoEntry::GetAttributes (const DWARFCompileUnit* cu, // referencing this DIE because curr_depth is not zero break; } - // Fall through... + LLVM_FALLTHROUGH; default: attributes.Append(cu, offset, attr, form); break; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp index dc1d88fa9d3..07e6c63f373 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp @@ -220,7 +220,7 @@ DWARFMappedHash::Prologue::AppendAtom (AtomType type, dw_form_t form) case DW_FORM_GNU_addr_index: case DW_FORM_GNU_str_index: hash_data_has_fixed_byte_size = false; - // Fall through to the cases below... + LLVM_FALLTHROUGH; case DW_FORM_flag: case DW_FORM_data1: case DW_FORM_ref1: @@ -230,7 +230,7 @@ DWARFMappedHash::Prologue::AppendAtom (AtomType type, dw_form_t form) case DW_FORM_block2: hash_data_has_fixed_byte_size = false; - // Fall through to the cases below... + LLVM_FALLTHROUGH; case DW_FORM_data2: case DW_FORM_ref2: min_hash_data_byte_size += 2; @@ -238,7 +238,7 @@ DWARFMappedHash::Prologue::AppendAtom (AtomType type, dw_form_t form) case DW_FORM_block4: hash_data_has_fixed_byte_size = false; - // Fall through to the cases below... + LLVM_FALLTHROUGH; case DW_FORM_data4: case DW_FORM_ref4: case DW_FORM_addr: diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index 829e11afd13..f7c65b2379f 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -4728,7 +4728,7 @@ ClangASTContext::GetBitSize (lldb::opaque_compiler_type_t type, ExecutionContext } } } - // fallthrough + LLVM_FALLTHROUGH; default: const uint32_t bit_size = getASTContext()->getTypeSize (qual_type); if (bit_size == 0) @@ -9299,6 +9299,7 @@ ClangASTContext::DumpTypeValue (lldb::opaque_compiler_type_t type, Stream *s, return true; } // format was not enum, just fall through and dump the value as requested.... + LLVM_FALLTHROUGH; default: // We are down to a scalar type that we just need to display. diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 9bd5dfe916b..496d24105b2 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -3884,7 +3884,7 @@ Process::ShouldBroadcastEvent (Event *event_ptr) m_stdio_communication.StopReadThread(); m_stdin_forward = false; - // fall-through + LLVM_FALLTHROUGH; case eStateConnected: case eStateAttaching: case eStateLaunching: diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp index ab6fe251cdd..e3e0b446842 100644 --- a/lldb/source/Target/StackFrame.cpp +++ b/lldb/source/Target/StackFrame.cpp @@ -756,7 +756,7 @@ StackFrame::GetValueForVariableExpressionPath (const char *var_expr_cstr, } } var_path.erase (0, 1); // Remove the '-' - // Fall through + LLVM_FALLTHROUGH; case '.': { const bool expr_is_ptr = var_path[0] == '>'; @@ -1554,12 +1554,12 @@ StackFrame::GetStatus (Stream& strm, case Debugger::eStopDisassemblyTypeNoDebugInfo: if (have_debuginfo) break; - // Fall through to next case + LLVM_FALLTHROUGH; case Debugger::eStopDisassemblyTypeNoSource: if (have_source) break; - // Fall through to next case + LLVM_FALLTHROUGH; case Debugger::eStopDisassemblyTypeAlways: if (target) |