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++).
This is an archive of the discontinued LLVM Phabricator instance.
Paths
| Differential D84285
Unify the return value of GetByteSize to an llvm::Optional<uint64_t> (NFC-ish) ClosedPublic Authored by aprantl on Jul 21 2020, 5:34 PM.
Revision Contents
Diff 279676 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
|
clang-tidy: error: 'lldb/Core/Value.h' file not found [clang-diagnostic-error]
not useful