diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
commit | f73363f1dd94996356cefbf24388f561891acf0b (patch) | |
tree | e3c31248bdb36eaec5fd833490d4278162dba2a0 /source/Expression/ExpressionVariable.cpp | |
parent | 160ee69dd7ae18978f4068116777639ea98dc951 (diff) |
Notes
Diffstat (limited to 'source/Expression/ExpressionVariable.cpp')
-rw-r--r-- | source/Expression/ExpressionVariable.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/Expression/ExpressionVariable.cpp b/source/Expression/ExpressionVariable.cpp index a97180029a84..bce9a87bfb47 100644 --- a/source/Expression/ExpressionVariable.cpp +++ b/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; @@ -69,8 +70,8 @@ void PersistentExpressionState::RegisterExecutionUnit( execution_unit_sp->GetJittedGlobalVariables()) { if (global_var.m_remote_addr != LLDB_INVALID_ADDRESS) { // Demangle the name before inserting it, so that lookups by the ConstStr - // of the demangled name - // will find the mangled one (needed for looking up metadata pointers.) + // of the demangled name will find the mangled one (needed for looking up + // metadata pointers.) Mangled mangler(global_var.m_name); mangler.GetDemangledName(lldb::eLanguageTypeUnknown); m_symbol_map[global_var.m_name.GetCString()] = global_var.m_remote_addr; @@ -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); +} |