From 4d51a90297d34389b53c00c5cd6fa6f73998c298 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Thu, 12 Jul 2018 22:28:52 +0000 Subject: Get rid of the C-string parameter in DoExecute Summary: This patch gets rid of the C-string parameter in the RawCommandObject::DoExecute function, making the code simpler and less memory unsafe. There seems to be a assumption in some command objects that this parameter could be a nullptr, but from what I can see the rest of the API doesn't actually allow this (and other command objects and related code pieces dereference this parameter without any checks). Especially CommandObjectRegexCommand has error handling code for a nullptr that is now gone. Reviewers: davide, jingham, teemperor Reviewed By: teemperor Subscribers: jingham, lldb-commits Differential Revision: https://reviews.llvm.org/D49207 llvm-svn: 336955 --- lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp') diff --git a/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp b/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp index 9ec9f434461..4bd4c6a029a 100644 --- a/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp @@ -27,7 +27,7 @@ ScriptInterpreterNone::ScriptInterpreterNone(CommandInterpreter &interpreter) ScriptInterpreterNone::~ScriptInterpreterNone() {} -bool ScriptInterpreterNone::ExecuteOneLine(const char *command, +bool ScriptInterpreterNone::ExecuteOneLine(llvm::StringRef command, CommandReturnObject *, const ExecuteScriptOptions &) { m_interpreter.GetDebugger().GetErrorFile()->PutCString( -- cgit v1.2.3