diff options
author | Muhammad Omair Javaid <omair.javaid@linaro.org> | 2022-12-19 13:50:31 +0500 |
---|---|---|
committer | Muhammad Omair Javaid <omair.javaid@linaro.org> | 2022-12-19 13:52:10 +0500 |
commit | 58e9cc13e24f668a33abdae201d59a02e10c22c0 (patch) | |
tree | 1ce7b2762a4cdfbee3cb63617038166a86f56d29 /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 0fe37a75a50bc54d93db299f3126b49b92a8d363 (diff) | |
download | llvm-58e9cc13e24f668a33abdae201d59a02e10c22c0.zip llvm-58e9cc13e24f668a33abdae201d59a02e10c22c0.tar.gz llvm-58e9cc13e24f668a33abdae201d59a02e10c22c0.tar.bz2 |
Revert "[lldb] Remove redundant .c_str() and .get() calls"
This reverts commit fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd.
This has broken all LLDB buildbots:
https://lab.llvm.org/buildbot/#/builders/68/builds/44990
https://lab.llvm.org/buildbot/#/builders/96/builds/33160
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 49c93a7..4aee2e4 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -1501,7 +1501,8 @@ CommandObject *CommandInterpreter::GetCommandObjectForCommand( else if (cmd_obj->IsMultiwordObject()) { // Our current object is a multi-word object; see if the cmd_word is a // valid sub-command for our object. - CommandObject *sub_cmd_obj = cmd_obj->GetSubcommandObject(cmd_word); + CommandObject *sub_cmd_obj = + cmd_obj->GetSubcommandObject(cmd_word.c_str()); if (sub_cmd_obj) cmd_obj = sub_cmd_obj; else // cmd_word was not a valid sub-command word, so we are done @@ -1765,8 +1766,9 @@ Status CommandInterpreter::PreprocessCommand(std::string &command) { options.SetTryAllThreads(true); options.SetTimeout(std::nullopt); - ExpressionResults expr_result = target.EvaluateExpression( - expr_str, exe_ctx.GetFramePtr(), expr_result_valobj_sp, options); + ExpressionResults expr_result = + target.EvaluateExpression(expr_str.c_str(), exe_ctx.GetFramePtr(), + expr_result_valobj_sp, options); if (expr_result == eExpressionCompleted) { Scalar scalar; @@ -3408,7 +3410,8 @@ CommandInterpreter::ResolveCommandImpl(std::string &command_line, } } else { if (cmd_obj->IsMultiwordObject()) { - CommandObject *sub_cmd_obj = cmd_obj->GetSubcommandObject(next_word); + CommandObject *sub_cmd_obj = + cmd_obj->GetSubcommandObject(next_word.c_str()); if (sub_cmd_obj) { // The subcommand's name includes the parent command's name, so // restart rather than append to the revised_command_line. |