summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Debugger.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-09-23 18:06:53 +0000
committerZachary Turner <zturner@google.com>2016-09-23 18:06:53 +0000
commit514d8cd83ea7408f7f4215a5f0233c6f10c7a1ca (patch)
treeaae2aa8aae6dc7bd2c941fa14b5fcae8a63a2281 /lldb/source/Core/Debugger.cpp
parent0120e3f278a5a9db6fa7b0cad258b209b409fa09 (diff)
downloadbcm5719-llvm-514d8cd83ea7408f7f4215a5f0233c6f10c7a1ca.tar.gz
bcm5719-llvm-514d8cd83ea7408f7f4215a5f0233c6f10c7a1ca.zip
Update the prompt related functions to use StringRefs.
llvm-svn: 282269
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r--lldb/source/Core/Debugger.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 7a727479e16..806f9151bf2 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -276,7 +276,7 @@ Error Debugger::SetPropertyValue(const ExecutionContext *exe_ctx,
if (error.Success()) {
// FIXME it would be nice to have "on-change" callbacks for properties
if (strcmp(property_path, g_properties[ePropertyPrompt].name) == 0) {
- const char *new_prompt = GetPrompt();
+ llvm::StringRef new_prompt = GetPrompt();
std::string str = lldb_utility::ansi::FormatAnsiTerminalCodes(
new_prompt, GetUseColor());
if (str.length())
@@ -337,16 +337,16 @@ bool Debugger::GetNotifyVoid() const {
nullptr, idx, g_properties[idx].default_uint_value != 0);
}
-const char *Debugger::GetPrompt() const {
+llvm::StringRef Debugger::GetPrompt() const {
const uint32_t idx = ePropertyPrompt;
return m_collection_sp->GetPropertyAtIndexAsString(
nullptr, idx, g_properties[idx].default_cstr_value);
}
-void Debugger::SetPrompt(const char *p) {
+void Debugger::SetPrompt(llvm::StringRef p) {
const uint32_t idx = ePropertyPrompt;
m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, p);
- const char *new_prompt = GetPrompt();
+ llvm::StringRef new_prompt = GetPrompt();
std::string str =
lldb_utility::ansi::FormatAnsiTerminalCodes(new_prompt, GetUseColor());
if (str.length())
OpenPOWER on IntegriCloud