[Lldb-commits] [PATCH] D96537: Make the error condition in Value::ValueType explicit (NFC)

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 11 12:47:23 PST 2021


aprantl created this revision.
aprantl added reviewers: JDevlieghere, teemperor, shafik.
Herald added a subscriber: emaste.
aprantl requested review of this revision.

The comment for ValueType claims that all values <1 are errors, but not all switch statements take this into account. This patch introduces an explicit Error case and deletes all `default:` cases, so we get warned about incomplete switch coverage.


https://reviews.llvm.org/D96537

Files:
  lldb/include/lldb/Core/Value.h
  lldb/include/lldb/Expression/ExpressionVariable.h
  lldb/source/Core/Value.cpp
  lldb/source/Core/ValueObject.cpp
  lldb/source/Core/ValueObjectChild.cpp
  lldb/source/Core/ValueObjectConstResult.cpp
  lldb/source/Core/ValueObjectConstResultImpl.cpp
  lldb/source/Core/ValueObjectMemory.cpp
  lldb/source/Core/ValueObjectRegister.cpp
  lldb/source/Core/ValueObjectVariable.cpp
  lldb/source/DataFormatters/TypeFormat.cpp
  lldb/source/Expression/DWARFExpression.cpp
  lldb/source/Expression/FunctionCaller.cpp
  lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
  lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.cpp
  lldb/source/Plugins/ABI/X86/ABISysV_i386.cpp
  lldb/source/Plugins/ABI/X86/ABISysV_x86_64.cpp
  lldb/source/Plugins/ABI/X86/ABIWindows_x86_64.cpp
  lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
  lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
  lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
  lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
  lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
  lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
  lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
  lldb/source/Target/ABI.cpp
  lldb/source/Target/RegisterContextUnwind.cpp
  lldb/source/Target/ThreadPlanTracer.cpp
  lldb/unittests/Expression/DWARFExpressionTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96537.323117.patch
Type: text/x-patch
Size: 76086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210211/041f552a/attachment-0001.bin>


More information about the lldb-commits mailing list