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
This commit is contained in:
@@ -1964,8 +1964,9 @@ void RenderScriptRuntime::FindStructTypeName(Element &elem,
|
||||
// Find all the global variables from the script rs modules
|
||||
VariableList variable_list;
|
||||
for (auto module_sp : m_rsmodules)
|
||||
module_sp->m_module->FindGlobalVariables(RegularExpression("."), true,
|
||||
UINT32_MAX, variable_list);
|
||||
module_sp->m_module->FindGlobalVariables(
|
||||
RegularExpression(llvm::StringRef(".")), true, UINT32_MAX,
|
||||
variable_list);
|
||||
|
||||
// Iterate over all the global variables looking for one with a matching type
|
||||
// to the Element.
|
||||
@@ -3741,15 +3742,16 @@ public:
|
||||
RegularExpression regex;
|
||||
RegularExpression::Match regex_match(3);
|
||||
|
||||
llvm::StringRef id_ref = llvm::StringRef::withNullAsEmpty(id_cstr);
|
||||
bool matched = false;
|
||||
if (regex.Compile("^([0-9]+),([0-9]+),([0-9]+)$") &&
|
||||
regex.Execute(id_cstr, ®ex_match))
|
||||
if (regex.Compile(llvm::StringRef("^([0-9]+),([0-9]+),([0-9]+)$")) &&
|
||||
regex.Execute(id_ref, ®ex_match))
|
||||
matched = true;
|
||||
else if (regex.Compile("^([0-9]+),([0-9]+)$") &&
|
||||
regex.Execute(id_cstr, ®ex_match))
|
||||
else if (regex.Compile(llvm::StringRef("^([0-9]+),([0-9]+)$")) &&
|
||||
regex.Execute(id_ref, ®ex_match))
|
||||
matched = true;
|
||||
else if (regex.Compile("^([0-9]+)$") &&
|
||||
regex.Execute(id_cstr, ®ex_match))
|
||||
else if (regex.Compile(llvm::StringRef("^([0-9]+)$")) &&
|
||||
regex.Execute(id_ref, ®ex_match))
|
||||
matched = true;
|
||||
for (uint32_t i = 0; i < 3; i++) {
|
||||
std::string group;
|
||||
|
||||
Reference in New Issue
Block a user