Author: zturner Date: Sat Nov 12 21:05:58 2016 New Revision: 286743 URL: http://llvm.org/viewvc/llvm-project?rev=286743&view=rev Log: Change IOHandlerConfirm to use StringRefs.
Modified: lldb/trunk/include/lldb/Core/IOHandler.h lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/source/Core/IOHandler.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/include/lldb/Core/IOHandler.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/IOHandler.h?rev=286743&r1=286742&r2=286743&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/IOHandler.h (original) +++ lldb/trunk/include/lldb/Core/IOHandler.h Sat Nov 12 21:05:58 2016 @@ -458,7 +458,7 @@ protected: // to see how. class IOHandlerConfirm : public IOHandlerDelegate, public IOHandlerEditline { public: - IOHandlerConfirm(Debugger &debugger, const char *prompt, + IOHandlerConfirm(Debugger &debugger, llvm::StringRef prompt, bool default_response); ~IOHandlerConfirm() override; Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=286743&r1=286742&r2=286743&view=diff ============================================================================== --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Sat Nov 12 21:05:58 2016 @@ -367,9 +367,8 @@ public: const char *ProcessEmbeddedScriptCommands(const char *arg); void UpdatePrompt(llvm::StringRef prompt); - void UpdatePrompt(const char *) = delete; - bool Confirm(const char *message, bool default_answer); + bool Confirm(llvm::StringRef message, bool default_answer); void LoadCommandDictionary(); Modified: lldb/trunk/source/Core/IOHandler.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=286743&r1=286742&r2=286743&view=diff ============================================================================== --- lldb/trunk/source/Core/IOHandler.cpp (original) +++ lldb/trunk/source/Core/IOHandler.cpp Sat Nov 12 21:05:58 2016 @@ -127,7 +127,7 @@ void IOHandlerStack::PrintAsync(Stream * } } -IOHandlerConfirm::IOHandlerConfirm(Debugger &debugger, const char *prompt, +IOHandlerConfirm::IOHandlerConfirm(Debugger &debugger, llvm::StringRef prompt, bool default_response) : IOHandlerEditline( debugger, IOHandler::Type::Confirm, Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=286743&r1=286742&r2=286743&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Sat Nov 12 21:05:58 2016 @@ -1896,7 +1896,7 @@ void CommandInterpreter::UpdatePrompt(ll m_command_io_handler_sp->SetPrompt(new_prompt); } -bool CommandInterpreter::Confirm(const char *message, bool default_answer) { +bool CommandInterpreter::Confirm(llvm::StringRef message, bool default_answer) { // Check AutoConfirm first: if (m_debugger.GetAutoConfirm()) return default_answer; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits