summaryrefslogtreecommitdiffstats
path: root/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-05-12 05:49:54 +0000
committerZachary Turner <zturner@google.com>2017-05-12 05:49:54 +0000
commit2833321f09efd9387257d17a3ef5128841142e6f (patch)
tree734c009de6f4895529effceec687d377434ba2d9 /lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
parent41c99364602a6965c30be674d75451ad87658d8c (diff)
downloadbcm5719-llvm-2833321f09efd9387257d17a3ef5128841142e6f.tar.gz
bcm5719-llvm-2833321f09efd9387257d17a3ef5128841142e6f.zip
Update StructuredData::String to return StringRefs.
It was returning const std::string& which was leading to unnecessary copies all over the place, and preventing people from doing things like Dict->GetValueForKeyAsString("foo", ref); llvm-svn: 302875
Diffstat (limited to 'lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp')
-rw-r--r--lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
index 8fe908d7d25..54c05a04246 100644
--- a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
@@ -40,7 +40,7 @@ BreakpointResolver *BreakpointResolverFileRegex::CreateFromStructuredData(
Status &error) {
bool success;
- std::string regex_string;
+ llvm::StringRef regex_string;
success = options_dict.GetValueForKeyAsString(
GetKey(OptionNames::RegexString), regex_string);
if (!success) {
@@ -65,7 +65,7 @@ BreakpointResolver *BreakpointResolverFileRegex::CreateFromStructuredData(
if (success && names_array) {
size_t num_names = names_array->GetSize();
for (size_t i = 0; i < num_names; i++) {
- std::string name;
+ llvm::StringRef name;
success = names_array->GetItemAtIndexAsString(i, name);
if (!success) {
error.SetErrorStringWithFormat(
OpenPOWER on IntegriCloud