summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandObjectRegexCommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/CommandObjectRegexCommand.cpp')
-rw-r--r--lldb/source/Interpreter/CommandObjectRegexCommand.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/CommandObjectRegexCommand.cpp b/lldb/source/Interpreter/CommandObjectRegexCommand.cpp
index 53e14c416b5..e5403092d9c 100644
--- a/lldb/source/Interpreter/CommandObjectRegexCommand.cpp
+++ b/lldb/source/Interpreter/CommandObjectRegexCommand.cpp
@@ -89,7 +89,8 @@ bool CommandObjectRegexCommand::AddRegexCommand(const char *re_cstr,
const char *command_cstr) {
m_entries.resize(m_entries.size() + 1);
// Only add the regular expression if it compiles
- if (m_entries.back().regex.Compile(re_cstr)) {
+ if (m_entries.back().regex.Compile(
+ llvm::StringRef::withNullAsEmpty(re_cstr))) {
m_entries.back().command.assign(command_cstr);
return true;
}
OpenPOWER on IntegriCloud