summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/FormattersHelpers.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-09-21 16:01:28 +0000
committerZachary Turner <zturner@google.com>2016-09-21 16:01:28 +0000
commit95eae4235d4cfa5cee67ab6c4e686baf8a57e9e5 (patch)
tree0e9d2a42e76e13cf5ed5d6a8f0b935a83e40ea69 /lldb/source/DataFormatters/FormattersHelpers.cpp
parent07171f21d148d340115ec634be6a7f296799517d (diff)
downloadbcm5719-llvm-95eae4235d4cfa5cee67ab6c4e686baf8a57e9e5.tar.gz
bcm5719-llvm-95eae4235d4cfa5cee67ab6c4e686baf8a57e9e5.zip
Make lldb::Regex use StringRef.
This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw no build or test failures. I cannot test any BSD or Android variants, however I expect the required changes to be minimal or non-existant. llvm-svn: 282079
Diffstat (limited to 'lldb/source/DataFormatters/FormattersHelpers.cpp')
-rw-r--r--lldb/source/DataFormatters/FormattersHelpers.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lldb/source/DataFormatters/FormattersHelpers.cpp b/lldb/source/DataFormatters/FormattersHelpers.cpp
index 842237fc91b..68802b902a2 100644
--- a/lldb/source/DataFormatters/FormattersHelpers.cpp
+++ b/lldb/source/DataFormatters/FormattersHelpers.cpp
@@ -34,7 +34,7 @@ void lldb_private::formatters::AddFormat(
if (regex)
category_sp->GetRegexTypeFormatsContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.AsCString())),
+ RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
format_sp);
else
category_sp->GetTypeFormatsContainer()->Add(type_name, format_sp);
@@ -45,7 +45,7 @@ void lldb_private::formatters::AddSummary(
ConstString type_name, bool regex) {
if (regex)
category_sp->GetRegexTypeSummariesContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.AsCString())),
+ RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
summary_sp);
else
category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
@@ -58,7 +58,7 @@ void lldb_private::formatters::AddStringSummary(
if (regex)
category_sp->GetRegexTypeSummariesContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.AsCString())),
+ RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
summary_sp);
else
category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
@@ -72,7 +72,7 @@ void lldb_private::formatters::AddOneLineSummary(
if (regex)
category_sp->GetRegexTypeSummariesContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.AsCString())),
+ RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
summary_sp);
else
category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
@@ -87,7 +87,7 @@ void lldb_private::formatters::AddCXXSummary(
new CXXFunctionSummaryFormat(flags, funct, description));
if (regex)
category_sp->GetRegexTypeSummariesContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.AsCString())),
+ RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
summary_sp);
else
category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
@@ -102,7 +102,7 @@ void lldb_private::formatters::AddCXXSynthetic(
new CXXSyntheticChildren(flags, description, generator));
if (regex)
category_sp->GetRegexTypeSyntheticsContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.AsCString())),
+ RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
synth_sp);
else
category_sp->GetTypeSyntheticsContainer()->Add(type_name, synth_sp);
@@ -117,7 +117,7 @@ void lldb_private::formatters::AddFilter(
filter_sp->AddExpressionPath(child);
if (regex)
category_sp->GetRegexTypeFiltersContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.AsCString())),
+ RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
filter_sp);
else
category_sp->GetTypeFiltersContainer()->Add(type_name, filter_sp);
OpenPOWER on IntegriCloud