summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandAlias.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-11-12 20:41:02 +0000
committerZachary Turner <zturner@google.com>2016-11-12 20:41:02 +0000
commit442f6530d21d0980c591522a1bd35dcaebce6f68 (patch)
treed0dfcd032d930ebc77461e41520f4a73012f0c76 /lldb/source/Interpreter/CommandAlias.cpp
parente2411fabdaf01d883d77cf3f8456367a9dc685ff (diff)
downloadbcm5719-llvm-442f6530d21d0980c591522a1bd35dcaebce6f68.tar.gz
bcm5719-llvm-442f6530d21d0980c591522a1bd35dcaebce6f68.zip
Make CommandObject help getters/setters use StringRef.
llvm-svn: 286731
Diffstat (limited to 'lldb/source/Interpreter/CommandAlias.cpp')
-rw-r--r--lldb/source/Interpreter/CommandAlias.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Interpreter/CommandAlias.cpp b/lldb/source/Interpreter/CommandAlias.cpp
index ba6ac7d40d7..d774a4ee477 100644
--- a/lldb/source/Interpreter/CommandAlias.cpp
+++ b/lldb/source/Interpreter/CommandAlias.cpp
@@ -224,28 +224,28 @@ std::pair<lldb::CommandObjectSP, OptionArgVectorSP> CommandAlias::Desugar() {
// allow CommandAlias objects to provide their own help, but fallback to the
// info
// for the underlying command if no customization has been provided
-void CommandAlias::SetHelp(const char *str) {
+void CommandAlias::SetHelp(llvm::StringRef str) {
this->CommandObject::SetHelp(str);
m_did_set_help = true;
}
-void CommandAlias::SetHelpLong(const char *str) {
+void CommandAlias::SetHelpLong(llvm::StringRef str) {
this->CommandObject::SetHelpLong(str);
m_did_set_help_long = true;
}
-const char *CommandAlias::GetHelp() {
+llvm::StringRef CommandAlias::GetHelp() {
if (!m_cmd_help_short.empty() || m_did_set_help)
- return m_cmd_help_short.c_str();
+ return m_cmd_help_short;
if (IsValid())
return m_underlying_command_sp->GetHelp();
- return nullptr;
+ return llvm::StringRef();
}
-const char *CommandAlias::GetHelpLong() {
+llvm::StringRef CommandAlias::GetHelpLong() {
if (!m_cmd_help_long.empty() || m_did_set_help_long)
- return m_cmd_help_long.c_str();
+ return m_cmd_help_long;
if (IsValid())
return m_underlying_command_sp->GetHelpLong();
- return nullptr;
+ return llvm::StringRef();
}
OpenPOWER on IntegriCloud