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
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 5c8083c..92e513d 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2198,7 +2198,7 @@
GetObjectFile()->GetModule()->LogMessage(
log, "SymbolFileDWARF::FindGlobalVariables (regex=\"%s\", append=%u, "
"max_matches=%u, variables)",
- regex.GetText(), append, max_matches);
+ regex.GetText().str().c_str(), append, max_matches);
}
DWARFDebugInfo *info = DebugInfo();
@@ -2252,7 +2252,7 @@
GetObjectFile()->GetModule()->ReportErrorIfModifyDetected(
"the DWARF debug information has been modified (.apple_names "
"accelerator table had bad die 0x%8.8x for regex '%s')\n",
- die_ref.die_offset, regex.GetText());
+ die_ref.die_offset, regex.GetText().str().c_str());
}
}
}
@@ -2673,7 +2673,7 @@
SymbolContextList &sc_list) {
Timer scoped_timer(LLVM_PRETTY_FUNCTION,
"SymbolFileDWARF::FindFunctions (regex = '%s')",
- regex.GetText());
+ regex.GetText().str().c_str());
Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
@@ -2681,7 +2681,7 @@
GetObjectFile()->GetModule()->LogMessage(
log,
"SymbolFileDWARF::FindFunctions (regex=\"%s\", append=%u, sc_list)",
- regex.GetText(), append);
+ regex.GetText().str().c_str(), append);
}
// If we aren't appending the results to this list, then clear the list