diff options
author | Greg Clayton <gclayton@apple.com> | 2016-02-26 01:20:20 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2016-02-26 01:20:20 +0000 |
commit | cec91ef92169483fbcc85c78a65e00a6fda1c35b (patch) | |
tree | 98e18b90c6eef89526ef8ecd294b88409b2a2f57 /lldb/source/Core | |
parent | 5971f18133cbdece6012b3e0f54ae85877e4306f (diff) | |
download | bcm5719-llvm-cec91ef92169483fbcc85c78a65e00a6fda1c35b.tar.gz bcm5719-llvm-cec91ef92169483fbcc85c78a65e00a6fda1c35b.zip |
Fix all of the unannotated switch cases to annotate the fall through or do the right thing and break.
llvm-svn: 261950
Diffstat (limited to 'lldb/source/Core')
-rw-r--r-- | lldb/source/Core/ArchSpec.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Core/FastDemangle.cpp | 1 | ||||
-rw-r--r-- | lldb/source/Core/RegisterValue.cpp | 17 | ||||
-rw-r--r-- | lldb/source/Core/Scalar.cpp | 1 | ||||
-rw-r--r-- | lldb/source/Core/ValueObject.cpp | 1 |
5 files changed, 15 insertions, 8 deletions
diff --git a/lldb/source/Core/ArchSpec.cpp b/lldb/source/Core/ArchSpec.cpp index a1fb65f0463..843e7484a08 100644 --- a/lldb/source/Core/ArchSpec.cpp +++ b/lldb/source/Core/ArchSpec.cpp @@ -1257,6 +1257,7 @@ cores_match (const ArchSpec::Core core1, const ArchSpec::Core core2, bool try_in return true; try_inverse = false; } + break; case ArchSpec::eCore_mips64: if (!enforce_exact_match) @@ -1267,6 +1268,7 @@ cores_match (const ArchSpec::Core core1, const ArchSpec::Core core2, bool try_in return true; try_inverse = false; } + break; case ArchSpec::eCore_mips64el: if (!enforce_exact_match) @@ -1277,6 +1279,7 @@ cores_match (const ArchSpec::Core core1, const ArchSpec::Core core2, bool try_in return true; try_inverse = false; } + break; case ArchSpec::eCore_mips64r2: case ArchSpec::eCore_mips64r3: diff --git a/lldb/source/Core/FastDemangle.cpp b/lldb/source/Core/FastDemangle.cpp index c46fb953dda..528f7f6bd88 100644 --- a/lldb/source/Core/FastDemangle.cpp +++ b/lldb/source/Core/FastDemangle.cpp @@ -2365,6 +2365,7 @@ private: Write('('); Write(m_read_ptr, m_read_end - m_read_ptr); Write(')'); + LLVM_FALLTHROUGH; case '\0': return true; default: diff --git a/lldb/source/Core/RegisterValue.cpp b/lldb/source/Core/RegisterValue.cpp index d4ba9989c6a..1e0a0abc783 100644 --- a/lldb/source/Core/RegisterValue.cpp +++ b/lldb/source/Core/RegisterValue.cpp @@ -239,16 +239,17 @@ RegisterValue::GetScalarValue (Scalar &scalar) const { case eTypeInvalid: break; case eTypeBytes: - { - switch (buffer.length) { - default: break; - case 1: scalar = *(const uint8_t *)buffer.bytes; return true; - case 2: scalar = *(const uint16_t *)buffer.bytes; return true; - case 4: scalar = *(const uint32_t *)buffer.bytes; return true; - case 8: scalar = *(const uint64_t *)buffer.bytes; return true; + switch (buffer.length) + { + default: break; + case 1: scalar = *(const uint8_t *)buffer.bytes; return true; + case 2: scalar = *(const uint16_t *)buffer.bytes; return true; + case 4: scalar = *(const uint32_t *)buffer.bytes; return true; + case 8: scalar = *(const uint64_t *)buffer.bytes; return true; + } } - } + break; case eTypeUInt8: case eTypeUInt16: case eTypeUInt32: diff --git a/lldb/source/Core/Scalar.cpp b/lldb/source/Core/Scalar.cpp index 4120d3263be..5a1ad37819d 100644 --- a/lldb/source/Core/Scalar.cpp +++ b/lldb/source/Core/Scalar.cpp @@ -2630,6 +2630,7 @@ Scalar::ExtractBitfield (uint32_t bit_size, case e_double: result = SignedBits ((uint64_t )m_float.convertToDouble(), msbit, lsbit); m_float = llvm::APFloat((double_t)result); + return true; case e_long_double: m_integer = m_float.bitcastToAPInt(); result = SignedBits (*m_integer.getRawData(), msbit, lsbit); diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 6b1a6c59063..a7cad8483c5 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -2797,6 +2797,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, } expression_cstr++; // skip the - } + LLVM_FALLTHROUGH; case '.': // or fallthrough from -> { if (options.m_check_dot_vs_arrow_syntax && *expression_cstr == '.' && |