[all-commits] [llvm/llvm-project] 113f56: Unify the return value of GetByteSize to an llvm::...

adrian-prantl via All-commits all-commits at lists.llvm.org
Mon Jul 27 13:26:58 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 113f56fbb80e8d6f705be19f8ae169a3fee2e4f8
      https://github.com/llvm/llvm-project/commit/113f56fbb80e8d6f705be19f8ae169a3fee2e4f8
  Author: Adrian Prantl <aprantl at apple.com>
  Date:   2020-07-27 (Mon, 27 Jul 2020)

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

  Log Message:
  -----------
  Unify the return value of GetByteSize to an llvm::Optional<uint64_t> (NFC-ish)

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++).

Differential Revision: https://reviews.llvm.org/D84285

This re-lands the patch with bogus :m_byte_size(0) initalizations removed.




More information about the All-commits mailing list