diff options
Diffstat (limited to 'lldb/source/Expression')
-rw-r--r-- | lldb/source/Expression/ExpressionVariable.cpp | 11 | ||||
-rw-r--r-- | lldb/source/Expression/Materializer.cpp | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lldb/source/Expression/ExpressionVariable.cpp b/lldb/source/Expression/ExpressionVariable.cpp index 13a42f1addc..bce9a87bfb4 100644 --- a/lldb/source/Expression/ExpressionVariable.cpp +++ b/lldb/source/Expression/ExpressionVariable.cpp @@ -9,6 +9,7 @@ #include "lldb/Expression/ExpressionVariable.h" #include "lldb/Expression/IRExecutionUnit.h" +#include "lldb/Target/Target.h" #include "lldb/Utility/Log.h" using namespace lldb_private; @@ -80,3 +81,13 @@ void PersistentExpressionState::RegisterExecutionUnit( } } } + +ConstString PersistentExpressionState::GetNextPersistentVariableName( + Target &target, llvm::StringRef Prefix) { + llvm::SmallString<64> name; + { + llvm::raw_svector_ostream os(name); + os << Prefix << target.GetNextPersistentVariableIndex(); + } + return ConstString(name); +} diff --git a/lldb/source/Expression/Materializer.cpp b/lldb/source/Expression/Materializer.cpp index df6e7dc86c6..74a965e015c 100644 --- a/lldb/source/Expression/Materializer.cpp +++ b/lldb/source/Expression/Materializer.cpp @@ -891,7 +891,8 @@ public: ConstString name = m_delegate ? m_delegate->GetName() - : persistent_state->GetNextPersistentVariableName(*target_sp); + : persistent_state->GetNextPersistentVariableName( + *target_sp, persistent_state->GetPersistentVariablePrefix()); lldb::ExpressionVariableSP ret = persistent_state->CreatePersistentVariable( exe_scope, name, m_type, map.GetByteOrder(), map.GetAddressByteSize()); |