diff options
author | Jim Ingham <jingham@apple.com> | 2020-03-20 14:59:54 -0700 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2020-03-23 13:30:37 -0700 |
commit | 67d67ebe8f2535c5de75c62820f7713f87d07307 (patch) | |
tree | 0c7d9159c6fb89cb6611dd4547394bb659b62b02 /lldb/source/Expression/Materializer.cpp | |
parent | 5f5fb56c68e4830597a5b52d7a8edafea21566ac (diff) | |
download | llvm-67d67ebe8f2535c5de75c62820f7713f87d07307.zip llvm-67d67ebe8f2535c5de75c62820f7713f87d07307.tar.gz llvm-67d67ebe8f2535c5de75c62820f7713f87d07307.tar.bz2 |
Internal expressions shouldn't increment the result variable numbering.
There an option: EvaluateExpressionOptions::SetResultIsInternal to indicate
whether the result number should be returned to the pool or not. It
got broken when the PersistentExpressionState was refactored.
This fixes the issue and provides a test of the behavior.
Differential Revision: https://reviews.llvm.org/D76532
Diffstat (limited to 'lldb/source/Expression/Materializer.cpp')
-rw-r--r-- | lldb/source/Expression/Materializer.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Expression/Materializer.cpp b/lldb/source/Expression/Materializer.cpp index 33c061e..8e96891 100644 --- a/lldb/source/Expression/Materializer.cpp +++ b/lldb/source/Expression/Materializer.cpp @@ -881,11 +881,9 @@ public: return; } - ConstString name = - m_delegate - ? m_delegate->GetName() - : persistent_state->GetNextPersistentVariableName( - *target_sp, persistent_state->GetPersistentVariablePrefix()); + ConstString name = m_delegate + ? m_delegate->GetName() + : persistent_state->GetNextPersistentVariableName(); lldb::ExpressionVariableSP ret = persistent_state->CreatePersistentVariable( exe_scope, name, m_type, map.GetByteOrder(), map.GetAddressByteSize()); |