aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectSource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectSource.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectSource.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index 6c6706f..79f1ce4 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -728,8 +728,8 @@ public:
Options *GetOptions() override { return &m_options; }
- const char *GetRepeatCommand(Args &current_command_args,
- uint32_t index) override {
+ llvm::Optional<std::string> GetRepeatCommand(Args &current_command_args,
+ uint32_t index) override {
// This is kind of gross, but the command hasn't been parsed yet so we
// can't look at the option values for this invocation... I have to scan
// the arguments directly.
@@ -738,13 +738,13 @@ public:
return e.ref() == "-r" || e.ref() == "--reverse";
});
if (iter == current_command_args.end())
- return m_cmd_name.c_str();
+ return m_cmd_name;
if (m_reverse_name.empty()) {
m_reverse_name = m_cmd_name;
m_reverse_name.append(" -r");
}
- return m_reverse_name.c_str();
+ return m_reverse_name;
}
protected: