summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/Variable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Symbol/Variable.cpp')
-rw-r--r--lldb/source/Symbol/Variable.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp
index 309e3926c87..3632eb86017 100644
--- a/lldb/source/Symbol/Variable.cpp
+++ b/lldb/source/Symbol/Variable.cpp
@@ -396,11 +396,12 @@ Variable::GetValuesForVariableExpressionPath (const char *variable_expr_path,
default:
{
- RegularExpression regex ("^([A-Za-z_:][A-Za-z_0-9:]*)(.*)");
- if (regex.Execute(variable_expr_path, 1))
+ static RegularExpression g_regex ("^([A-Za-z_:][A-Za-z_0-9:]*)(.*)");
+ RegularExpression::Match regex_match(1);
+ if (g_regex.Execute(variable_expr_path, &regex_match))
{
std::string variable_name;
- if (regex.GetMatchAtIndex(variable_expr_path, 1, variable_name))
+ if (regex_match.GetMatchAtIndex(variable_expr_path, 1, variable_name))
{
variable_list.Clear();
if (callback (baton, variable_name.c_str(), variable_list))
OpenPOWER on IntegriCloud