[Lldb-commits] [PATCH] D84285: Unify the return value of GetByteSize to an llvm::Optional<uint64_t> (NFC-ish)

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 21 17:34:39 PDT 2020


aprantl created this revision.
aprantl added reviewers: jingham, shafik, teemperor.
Herald added a project: LLDB.

This cleanup patch unifies all methods called GetByteSize in the ValueObject hierarchy to return an optional, like the methods in CompilerType do. This means fewer magic `0` values, which could fix bugs down the road in languages where types can have a size of zero, such as Swift and C (but not C++).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84285

Files:
  lldb/include/lldb/Core/ValueObject.h
  lldb/include/lldb/Core/ValueObjectCast.h
  lldb/include/lldb/Core/ValueObjectChild.h
  lldb/include/lldb/Core/ValueObjectConstResult.h
  lldb/include/lldb/Core/ValueObjectDynamicValue.h
  lldb/include/lldb/Core/ValueObjectMemory.h
  lldb/include/lldb/Core/ValueObjectRegister.h
  lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
  lldb/include/lldb/Core/ValueObjectVariable.h
  lldb/include/lldb/Expression/ExpressionVariable.h
  lldb/include/lldb/Target/StackFrameRecognizer.h
  lldb/source/API/SBValue.cpp
  lldb/source/Commands/CommandObjectWatchpoint.cpp
  lldb/source/Core/ValueObject.cpp
  lldb/source/Core/ValueObjectCast.cpp
  lldb/source/Core/ValueObjectConstResult.cpp
  lldb/source/Core/ValueObjectDynamicValue.cpp
  lldb/source/Core/ValueObjectMemory.cpp
  lldb/source/Core/ValueObjectRegister.cpp
  lldb/source/Core/ValueObjectSyntheticFilter.cpp
  lldb/source/Core/ValueObjectVariable.cpp
  lldb/source/Expression/ExpressionVariable.cpp
  lldb/source/Expression/Materializer.cpp
  lldb/source/Target/StackFrame.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84285.279676.patch
Type: text/x-patch
Size: 19664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200722/78df5cd1/attachment-0001.bin>


More information about the lldb-commits mailing list