aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp')
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
index 8ebf78409a03..34fc7a19f110 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
@@ -10,6 +10,7 @@
#include "ClangPersistentVariables.h"
#include "lldb/Core/Value.h"
+#include "lldb/Target/Target.h"
#include "lldb/Utility/DataExtractor.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"
@@ -52,10 +53,11 @@ void ClangPersistentVariables::RemovePersistentVariable(
m_next_persistent_variable_id--;
}
-ConstString ClangPersistentVariables::GetNextPersistentVariableName() {
+ConstString
+ClangPersistentVariables::GetNextPersistentVariableName(Target &target) {
char name_cstr[256];
::snprintf(name_cstr, sizeof(name_cstr), "$%u",
- m_next_persistent_variable_id++);
+ target.GetNextPersistentVariableIndex());
ConstString name(name_cstr);
return name;
}