[Lldb-commits] [PATCH] D84285: Unify the return value of GetByteSize to an llvm::Optional (NFC-ish)
This revision was automatically updated to reflect the committed changes. Closed by commit rG1d9b860fb6a8: Unify the return value of GetByteSize to an llvm::Optional(NFC-ish) (authored by aprantl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84285/new/ 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 Index: lldb/source/Target/StackFrame.cpp === --- lldb/source/Target/StackFrame.cpp +++ lldb/source/Target/StackFrame.cpp @@ -1408,7 +1408,7 @@ } int64_t child_offset = child_sp->GetByteOffset(); -int64_t child_size = child_sp->GetByteSize(); +int64_t child_size = child_sp->GetByteSize().getValueOr(0); if (offset >= child_offset && offset < (child_offset + child_size)) { return GetValueForOffset(frame, child_sp, offset - child_offset); @@ -1441,8 +1441,8 @@ } if (offset >= 0 && uint64_t(offset) >= pointee->GetByteSize()) { -int64_t index = offset / pointee->GetByteSize(); -offset = offset % pointee->GetByteSize(); +int64_t index = offset / pointee->GetByteSize().getValueOr(1); +offset = offset % pointee->GetByteSize().getValueOr(1); const bool can_create = true; pointee = base->GetSyntheticArrayMember(index, can_create); } Index: lldb/source/Expression/Materializer.cpp === --- lldb/source/Expression/Materializer.cpp +++ lldb/source/Expression/Materializer.cpp @@ -67,7 +67,7 @@ const bool zero_memory = false; lldb::addr_t mem = map.Malloc( -m_persistent_variable_sp->GetByteSize(), 8, +m_persistent_variable_sp->GetByteSize().getValueOr(0), 8, lldb::ePermissionsReadable | lldb::ePermissionsWritable, IRMemoryMap::eAllocationPolicyMirror, zero_memory, allocate_error); @@ -106,7 +106,8 @@ Status write_error; map.WriteMemory(mem, m_persistent_variable_sp->GetValueBytes(), -m_persistent_variable_sp->GetByteSize(), write_error); +m_persistent_variable_sp->GetByteSize().getValueOr(0), +write_error); if (!write_error.Success()) { err.SetErrorStringWithFormat( @@ -234,7 +235,7 @@ map.GetBestExecutionContextScope(), m_persistent_variable_sp.get()->GetCompilerType(), m_persistent_variable_sp->GetName(), location, eAddressTypeLoad, -m_persistent_variable_sp->GetByteSize()); +m_persistent_variable_sp->GetByteSize().getValueOr(0)); if (frame_top != LLDB_INVALID_ADDRESS && frame_bottom != LLDB_INVALID_ADDRESS && location >= frame_bottom && @@ -279,7 +280,8 @@ LLDB_LOGF(log, "Dematerializing %s from 0x%" PRIx64 " (size = %llu)", m_persistent_variable_sp->GetName().GetCString(), (uint64_t)mem, - (unsigned long long)m_persistent_variable_sp->GetByteSize()); + (unsigned long long)m_persistent_variable_sp->GetByteSize() + .getValueOr(0)); // Read the contents of the spare memory area @@ -288,7 +290,7 @@ Status read_error; map.ReadMemory(m_persistent_variable_sp->GetValueBytes(), mem, - m_persistent_variable_sp->GetByteSize(), read_error); + m_persistent_variable_sp->GetByteSize().getValueOr(0), read_error); if (!read_error.Success()) { err.SetErrorStringWithFormat( @@ -369,10 +371,11 @@ if (!err.Success()) { dump_stream.Printf(" \n"); } else { -DataBufferHeap data(m_persistent_variable_sp->GetByteSize(), 0); +DataBufferHeap data( +m_persistent_variable_sp->GetByteSize().getValueOr(0), 0); map.ReadMemory(data.GetBytes(), target_address, -
[Lldb-commits] [lldb] 1d9b860 - Unify the return value of GetByteSize to an llvm::Optional (NFC-ish)
Author: Adrian Prantl Date: 2020-07-25T08:27:21-07:00 New Revision: 1d9b860fb6a85df33fd52fcacc6a5efb421621bd URL: https://github.com/llvm/llvm-project/commit/1d9b860fb6a85df33fd52fcacc6a5efb421621bd DIFF: https://github.com/llvm/llvm-project/commit/1d9b860fb6a85df33fd52fcacc6a5efb421621bd.diff LOG: Unify the return value of GetByteSize to an llvm::Optional (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 Added: Modified: 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 Removed: diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h index 0080368fd996..a557d69f3ae3 100644 --- a/lldb/include/lldb/Core/ValueObject.h +++ b/lldb/include/lldb/Core/ValueObject.h @@ -358,7 +358,7 @@ class ValueObject : public UserID { virtual bool CanProvideValue(); // Subclasses must implement the functions below. - virtual uint64_t GetByteSize() = 0; + virtual llvm::Optional GetByteSize() = 0; virtual lldb::ValueType GetValueType() const = 0; diff --git a/lldb/include/lldb/Core/ValueObjectCast.h b/lldb/include/lldb/Core/ValueObjectCast.h index d91ca6a92be8..342803f8ca63 100644 --- a/lldb/include/lldb/Core/ValueObjectCast.h +++ b/lldb/include/lldb/Core/ValueObjectCast.h @@ -30,7 +30,7 @@ class ValueObjectCast : public ValueObject { ConstString name, const CompilerType &cast_type); - uint64_t GetByteSize() override; + llvm::Optional GetByteSize() override; size_t CalculateNumChildren(uint32_t max) override; diff --git a/lldb/include/lldb/Core/ValueObjectChild.h b/lldb/include/lldb/Core/ValueObjectChild.h index c6f44a29b059..9a9fd9294261 100644 --- a/lldb/include/lldb/Core/ValueObjectChild.h +++ b/lldb/include/lldb/Core/ValueObjectChild.h @@ -30,7 +30,7 @@ class ValueObjectChild : public ValueObject { public: ~ValueObjectChild() override; - uint64_t GetByteSize() override { return m_byte_size; } + llvm::Optional GetByteSize() override { return m_byte_size; } lldb::offset_t GetByteOffset() override { return m_byte_offset; } diff --git a/lldb/include/lldb/Core/ValueObjectConstResult.h b/lldb/include/lldb/Core/ValueObjectConstResult.h index 0e868c687e93..8d823baa0b7b 100644 --- a/lldb/include/lldb/Core/ValueObjectConstResult.h +++ b/lldb/include/lldb/Core/ValueObjectConstResult.h @@ -62,7 +62,7 @@ class ValueObjectConstResult : public ValueObject { static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, const Status &error); - uint64_t GetByteSize() override; + llvm::Optional GetByteSize() override; lldb::ValueType GetValueType() const override; @@ -113,7 +113,7 @@ class ValueObjectConstResult : public ValueObject { CompilerType GetCompilerTypeImpl() override; ConstString m_type_name; - uint64_t m_byte_size; + llvm::Optional m_byte_size; ValueObjectConstResultImpl m_impl; diff --git a/lldb/include/lldb/Core/ValueObjectDynamicValue.h b/lldb/include/lldb/Core/ValueObjectDynamicValue.h index 9f5304b55e93..2806857339ef 100644 --- a/lldb/include/lldb/Core/ValueObjectDynamicValue.h +++ b/lldb/include/lldb/Core/ValueObjectDynamicValue.h @@ -34,7 +34,7 @@ class ValueObjectDynamicValue : public ValueObject { public: ~ValueObjectDynamicValue() override; - uint64_t GetByteSize() override; + llvm::Optional GetByteSize() override; ConstString GetTypeName() override; diff --git a/lldb/include/lldb/Core/ValueObjectMemory.h
[Lldb-commits] [PATCH] D68908: remove somewhat dangerous 'd'(etach) and 'k'(ill) shortcuts
clayborg added a comment. So it seems like we should be either moving everything to the process menu, or keeping everything and introducing a confirmation dialog for any dangerous commands (kill, both detaches). This patch seems to keep some dangerous commands (detach suspended), remove one (detach), and add another (kill). Comment at: lldb/source/Core/IOHandler.cpp:3766 -{'d', "Detach and resume process"}, {'D', "Detach with process suspended"}, {'h', "Show help dialog"}, Do we really want to remove 'd' and not 'D' as well? We now handle this in the process menu right? Comment at: lldb/source/Core/IOHandler.cpp:4331 -case 'd': // 'd' == detach and let run case 'D': // 'D' == detach and keep stopped { Do we really want to remove 'd' and not 'D' as well? We now handle this in the process menu right? Comment at: lldb/source/Core/IOHandler.cpp:4340-4349 -case 'k': - // 'k' == kill - { -ExecutionContext exe_ctx = -m_debugger.GetCommandInterpreter().GetExecutionContext(); -if (exe_ctx.HasProcessScope()) - exe_ctx.GetProcessRef().Destroy(false); Is this not handled in the process menu? 'k' seems dangerous. Either that or we can introduce a confirmation dialog? Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68908/new/ https://reviews.llvm.org/D68908 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D68908: remove somewhat dangerous 'd'(etach) and 'k'(ill) shortcuts
clayborg added a comment. If removing 'd' was only to make it available for "up" and "down" in https://reviews.llvm.org/D68541, then maybe we should switch 'D' to "detach and let run? Or is that what we did, but the comment on line 4331 is now out of date? Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68908/new/ https://reviews.llvm.org/D68908 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D68541: Implement 'up' and 'down' shortcuts in lldb gui
clayborg added a comment. Yikes, sorry for not responding for so long. In the fall I was out on medical leave due to a head injury. Please feel free to ping more often if I do this again. I commented in the other patches (one accepted, and questions in the other). Let me know your thoughts. Comment at: lldb/source/Core/IOHandler.cpp:4433 +--frame_idx; +if( thread->SetSelectedFrameByIndex( frame_idx, true )) + exe_ctx.SetFrameSP(thread->GetSelectedFrame()); Clang format this? ``` if (thread->SetSelectedFrameByIndex(frame_idx, true)) ``` Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68541/new/ https://reviews.llvm.org/D68541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 4b14ef3 - Temporarily Revert "Unify the return value of GetByteSize to an llvm::Optional (NFC-ish)"
Author: Eric Christopher Date: 2020-07-25T18:42:04-07:00 New Revision: 4b14ef33e81c01632e848e7a67ccc6b11fb4c595 URL: https://github.com/llvm/llvm-project/commit/4b14ef33e81c01632e848e7a67ccc6b11fb4c595 DIFF: https://github.com/llvm/llvm-project/commit/4b14ef33e81c01632e848e7a67ccc6b11fb4c595.diff LOG: Temporarily Revert "Unify the return value of GetByteSize to an llvm::Optional (NFC-ish)" as it's causing numerous (176) test failures on linux. This reverts commit 1d9b860fb6a85df33fd52fcacc6a5efb421621bd. Added: Modified: 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 Removed: diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h index a557d69f3ae3..0080368fd996 100644 --- a/lldb/include/lldb/Core/ValueObject.h +++ b/lldb/include/lldb/Core/ValueObject.h @@ -358,7 +358,7 @@ class ValueObject : public UserID { virtual bool CanProvideValue(); // Subclasses must implement the functions below. - virtual llvm::Optional GetByteSize() = 0; + virtual uint64_t GetByteSize() = 0; virtual lldb::ValueType GetValueType() const = 0; diff --git a/lldb/include/lldb/Core/ValueObjectCast.h b/lldb/include/lldb/Core/ValueObjectCast.h index 342803f8ca63..d91ca6a92be8 100644 --- a/lldb/include/lldb/Core/ValueObjectCast.h +++ b/lldb/include/lldb/Core/ValueObjectCast.h @@ -30,7 +30,7 @@ class ValueObjectCast : public ValueObject { ConstString name, const CompilerType &cast_type); - llvm::Optional GetByteSize() override; + uint64_t GetByteSize() override; size_t CalculateNumChildren(uint32_t max) override; diff --git a/lldb/include/lldb/Core/ValueObjectChild.h b/lldb/include/lldb/Core/ValueObjectChild.h index 9a9fd9294261..c6f44a29b059 100644 --- a/lldb/include/lldb/Core/ValueObjectChild.h +++ b/lldb/include/lldb/Core/ValueObjectChild.h @@ -30,7 +30,7 @@ class ValueObjectChild : public ValueObject { public: ~ValueObjectChild() override; - llvm::Optional GetByteSize() override { return m_byte_size; } + uint64_t GetByteSize() override { return m_byte_size; } lldb::offset_t GetByteOffset() override { return m_byte_offset; } diff --git a/lldb/include/lldb/Core/ValueObjectConstResult.h b/lldb/include/lldb/Core/ValueObjectConstResult.h index 8d823baa0b7b..0e868c687e93 100644 --- a/lldb/include/lldb/Core/ValueObjectConstResult.h +++ b/lldb/include/lldb/Core/ValueObjectConstResult.h @@ -62,7 +62,7 @@ class ValueObjectConstResult : public ValueObject { static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, const Status &error); - llvm::Optional GetByteSize() override; + uint64_t GetByteSize() override; lldb::ValueType GetValueType() const override; @@ -113,7 +113,7 @@ class ValueObjectConstResult : public ValueObject { CompilerType GetCompilerTypeImpl() override; ConstString m_type_name; - llvm::Optional m_byte_size; + uint64_t m_byte_size; ValueObjectConstResultImpl m_impl; diff --git a/lldb/include/lldb/Core/ValueObjectDynamicValue.h b/lldb/include/lldb/Core/ValueObjectDynamicValue.h index 2806857339ef..9f5304b55e93 100644 --- a/lldb/include/lldb/Core/ValueObjectDynamicValue.h +++ b/lldb/include/lldb/Core/ValueObjectDynamicValue.h @@ -34,7 +34,7 @@ class ValueObjectDynamicValue : public ValueObject { public: ~ValueObjectDynamicValue() override; - llvm::Optional GetByteSize() override; + uint64_t GetByteSize() override; ConstString GetTypeName() override; diff --git a/lldb/include/lldb/Core/ValueObjectMemory.h b/lldb/include/lldb/Core/ValueObjectMemory.h index b5d5e6ecf4c0..d1cd6ae41445 100644 --- a/lldb/include/lldb/Core/ValueObjectMemory.h +++ b/lldb/include/lldb/Core/ValueObjectMemory.h @@ -40,7 +40,7 @@ class ValueObjec
Re: [Lldb-commits] [lldb] 1d9b860 - Unify the return value of GetByteSize to an llvm::Optional (NFC-ish)
Hi Adrian, I'm really sorry, but I've just reverted this. I'm not sure what's up, but it's causing massive test failures in lldb on linux. Happy to help sync up with you. echristo@athyra ~/s/llvm-project> git push To github.com:llvm/llvm-project.git 18975762c19..4b14ef33e81 master -> master Thanks! -eric On Sat, Jul 25, 2020 at 8:28 AM Adrian Prantl via lldb-commits < lldb-commits@lists.llvm.org> wrote: > > Author: Adrian Prantl > Date: 2020-07-25T08:27:21-07:00 > New Revision: 1d9b860fb6a85df33fd52fcacc6a5efb421621bd > > URL: > https://github.com/llvm/llvm-project/commit/1d9b860fb6a85df33fd52fcacc6a5efb421621bd > DIFF: > https://github.com/llvm/llvm-project/commit/1d9b860fb6a85df33fd52fcacc6a5efb421621bd.diff > > LOG: Unify the return value of GetByteSize to an llvm::Optional > (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 > > Added: > > > Modified: > 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 > > Removed: > > > > > > diff --git a/lldb/include/lldb/Core/ValueObject.h > b/lldb/include/lldb/Core/ValueObject.h > index 0080368fd996..a557d69f3ae3 100644 > --- a/lldb/include/lldb/Core/ValueObject.h > +++ b/lldb/include/lldb/Core/ValueObject.h > @@ -358,7 +358,7 @@ class ValueObject : public UserID { >virtual bool CanProvideValue(); > >// Subclasses must implement the functions below. > - virtual uint64_t GetByteSize() = 0; > + virtual llvm::Optional GetByteSize() = 0; > >virtual lldb::ValueType GetValueType() const = 0; > > > diff --git a/lldb/include/lldb/Core/ValueObjectCast.h > b/lldb/include/lldb/Core/ValueObjectCast.h > index d91ca6a92be8..342803f8ca63 100644 > --- a/lldb/include/lldb/Core/ValueObjectCast.h > +++ b/lldb/include/lldb/Core/ValueObjectCast.h > @@ -30,7 +30,7 @@ class ValueObjectCast : public ValueObject { > ConstString name, > const CompilerType &cast_type); > > - uint64_t GetByteSize() override; > + llvm::Optional GetByteSize() override; > >size_t CalculateNumChildren(uint32_t max) override; > > > diff --git a/lldb/include/lldb/Core/ValueObjectChild.h > b/lldb/include/lldb/Core/ValueObjectChild.h > index c6f44a29b059..9a9fd9294261 100644 > --- a/lldb/include/lldb/Core/ValueObjectChild.h > +++ b/lldb/include/lldb/Core/ValueObjectChild.h > @@ -30,7 +30,7 @@ class ValueObjectChild : public ValueObject { > public: >~ValueObjectChild() override; > > - uint64_t GetByteSize() override { return m_byte_size; } > + llvm::Optional GetByteSize() override { return m_byte_size; } > >lldb::offset_t GetByteOffset() override { return m_byte_offset; } > > > diff --git a/lldb/include/lldb/Core/ValueObjectConstResult.h > b/lldb/include/lldb/Core/ValueObjectConstResult.h > index 0e868c687e93..8d823baa0b7b 100644 > --- a/lldb/include/lldb/Core/ValueObjectConstResult.h > +++ b/lldb/include/lldb/Core/ValueObjectConstResult.h > @@ -62,7 +62,7 @@ class ValueObjectConstResult : public ValueObject { >static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, > const Status &error); > > - uint64_t GetByteSize() override; > + llvm::Optional GetByteSize() override; > >lldb::ValueType GetValueType() const override; > > @@ -113,7 +113,7 @@ class ValueObjectConstResult : public ValueObject { >CompilerType GetCompilerTypeImpl() override; > >ConstString m_type_name; > - uint64_t m_byte_size; > + llvm::Optional m_byte_size; > >Val