diff options
| author | Zachary Turner <zturner@google.com> | 2016-09-21 16:01:28 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2016-09-21 16:01:28 +0000 |
| commit | 95eae4235d4cfa5cee67ab6c4e686baf8a57e9e5 (patch) | |
| tree | 0e9d2a42e76e13cf5ed5d6a8f0b935a83e40ea69 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime | |
| parent | 07171f21d148d340115ec634be6a7f296799517d (diff) | |
| download | bcm5719-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/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime')
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index 832f50dba88..9d751a75da0 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -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; |

