Author: Raphael Isemann Date: 2020-11-05T17:17:33+01:00 New Revision: 79d16764dd29aeddb7e6400e6b2d89d31653886c
URL: https://github.com/llvm/llvm-project/commit/79d16764dd29aeddb7e6400e6b2d89d31653886c DIFF: https://github.com/llvm/llvm-project/commit/79d16764dd29aeddb7e6400e6b2d89d31653886c.diff LOG: [lldb][NFC] Fix compiler warnings after removal of eValueTypeVector 5d64574301836c4c17127794121d49a62d24f803 removes this enum value and now all the switch statements that previously relied on handling this in the 'default' branch are causes compiler warnings due to redundant default cases. This just removes the now unreachable code in there. Added: Modified: lldb/source/Core/Value.cpp lldb/source/Core/ValueObjectChild.cpp lldb/source/Core/ValueObjectMemory.cpp Removed: ################################################################################ diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp index 8007df4f934e0..cc8f3f4e26153 100644 --- a/lldb/source/Core/Value.cpp +++ b/lldb/source/Core/Value.cpp @@ -113,7 +113,6 @@ Value::ValueType Value::GetValueType() const { return m_value_type; } AddressType Value::GetValueAddressType() const { switch (m_value_type) { - default: case eValueTypeScalar: break; case eValueTypeLoadAddress: @@ -278,9 +277,6 @@ lldb::Format Value::GetValueDefaultFormat() { bool Value::GetData(DataExtractor &data) { switch (m_value_type) { - default: - break; - case eValueTypeScalar: if (m_value.GetData(data)) return true; @@ -571,7 +567,6 @@ Scalar &Value::ResolveValue(ExecutionContext *exe_ctx) { case eValueTypeScalar: // raw scalar value break; - default: case eValueTypeFileAddress: case eValueTypeLoadAddress: // load address value case eValueTypeHostAddress: // host address value (for memory in the process diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp index 97974d7b98fb2..34baa19f0a248 100644 --- a/lldb/source/Core/ValueObjectChild.cpp +++ b/lldb/source/Core/ValueObjectChild.cpp @@ -190,9 +190,6 @@ bool ValueObjectChild::UpdateValue() { m_value.GetScalar() = scalar; } break; - default: - m_error.SetErrorString("parent has invalid value."); - break; } if (m_error.Success()) { diff --git a/lldb/source/Core/ValueObjectMemory.cpp b/lldb/source/Core/ValueObjectMemory.cpp index 17fade9e5fdc3..abf7b38ed89ac 100644 --- a/lldb/source/Core/ValueObjectMemory.cpp +++ b/lldb/source/Core/ValueObjectMemory.cpp @@ -168,9 +168,6 @@ bool ValueObjectMemory::UpdateValue() { Value::ValueType value_type = m_value.GetValueType(); switch (value_type) { - default: - llvm_unreachable("Unhandled expression result value kind..."); - case Value::eValueTypeScalar: // The variable value is in the Scalar value inside the m_value. We can // point our m_data right to it. _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits