summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core')
-rw-r--r--lldb/source/Core/Broadcaster.cpp2
-rw-r--r--lldb/source/Core/Debugger.cpp6
-rw-r--r--lldb/source/Core/Disassembler.cpp6
-rw-r--r--lldb/source/Core/FormatEntity.cpp2
-rw-r--r--lldb/source/Core/Log.cpp6
-rw-r--r--lldb/source/Core/Module.cpp2
-rw-r--r--lldb/source/Core/Scalar.cpp4
-rw-r--r--lldb/source/Core/SearchFilter.cpp8
-rw-r--r--lldb/source/Core/StructuredData.cpp2
-rw-r--r--lldb/source/Core/ValueObject.cpp2
10 files changed, 20 insertions, 20 deletions
diff --git a/lldb/source/Core/Broadcaster.cpp b/lldb/source/Core/Broadcaster.cpp
index 9f1ec53ac6b..d2cca7a2a65 100644
--- a/lldb/source/Core/Broadcaster.cpp
+++ b/lldb/source/Core/Broadcaster.cpp
@@ -99,7 +99,7 @@ bool Broadcaster::BroadcasterImpl::GetEventNames(
s.PutCString(GetBroadcasterName());
s.PutChar('.');
}
- s.PutCString(pos->second.c_str());
+ s.PutCString(pos->second);
++num_names_added;
}
}
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 806f9151bf2..96461f80446 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -280,7 +280,7 @@ Error Debugger::SetPropertyValue(const ExecutionContext *exe_ctx,
std::string str = lldb_utility::ansi::FormatAnsiTerminalCodes(
new_prompt, GetUseColor());
if (str.length())
- new_prompt = str.c_str();
+ new_prompt = str;
GetCommandInterpreter().UpdatePrompt(new_prompt);
EventSP prompt_change_event_sp(
new Event(CommandInterpreter::eBroadcastBitResetPrompt,
@@ -350,7 +350,7 @@ void Debugger::SetPrompt(llvm::StringRef p) {
std::string str =
lldb_utility::ansi::FormatAnsiTerminalCodes(new_prompt, GetUseColor());
if (str.length())
- new_prompt = str.c_str();
+ new_prompt = str;
GetCommandInterpreter().UpdatePrompt(new_prompt);
}
@@ -1429,7 +1429,7 @@ void Debugger::HandleProcessEvent(const EventSP &event_sp) {
content_stream.Flush();
// Print it.
- output_stream_sp->PutCString(content_stream.GetString().c_str());
+ output_stream_sp->PutCString(content_stream.GetString());
}
} else {
error_stream_sp->Printf("Failed to print structured "
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp
index 5a320d1cd37..577f2f6d474 100644
--- a/lldb/source/Core/Disassembler.cpp
+++ b/lldb/source/Core/Disassembler.cpp
@@ -725,15 +725,15 @@ void Instruction::Dump(lldb_private::Stream *s, uint32_t max_opcode_byte_size,
opcode_column_width = m_opcode_name.length() + 1;
}
- ss.PutCString(m_opcode_name.c_str());
+ ss.PutCString(m_opcode_name);
ss.FillLastLineToColumn(opcode_pos + opcode_column_width, ' ');
- ss.PutCString(m_mnemonics.c_str());
+ ss.PutCString(m_mnemonics);
if (!m_comment.empty()) {
ss.FillLastLineToColumn(
opcode_pos + opcode_column_width + operand_column_width, ' ');
ss.PutCString(" ; ");
- ss.PutCString(m_comment.c_str());
+ ss.PutCString(m_comment);
}
s->Write(ss.GetData(), ss.GetSize());
}
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp
index 99b4a807936..f5eb4d497c2 100644
--- a/lldb/source/Core/FormatEntity.cpp
+++ b/lldb/source/Core/FormatEntity.cpp
@@ -1106,7 +1106,7 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
return true; // Only return true if all items succeeded
case Entry::Type::String:
- s.PutCString(entry.string.c_str());
+ s.PutCString(entry.string);
return true;
case Entry::Type::Scope: {
diff --git a/lldb/source/Core/Log.cpp b/lldb/source/Core/Log.cpp
index 173d954fa16..30b6188d04c 100644
--- a/lldb/source/Core/Log.cpp
+++ b/lldb/source/Core/Log.cpp
@@ -107,16 +107,16 @@ void Log::VAPrintf(const char *format, va_list args) {
llvm::raw_string_ostream stream(back_trace);
llvm::sys::PrintStackTrace(stream);
stream.flush();
- header.PutCString(back_trace.c_str());
+ header.PutCString(back_trace);
}
if (m_options.Test(LLDB_LOG_OPTION_THREADSAFE)) {
static std::recursive_mutex g_LogThreadedMutex;
std::lock_guard<std::recursive_mutex> guard(g_LogThreadedMutex);
- stream_sp->PutCString(header.GetString().c_str());
+ stream_sp->PutCString(header.GetString());
stream_sp->Flush();
} else {
- stream_sp->PutCString(header.GetString().c_str());
+ stream_sp->PutCString(header.GetString());
stream_sp->Flush();
}
}
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 41981a4daaf..b1a656959b8 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -1208,7 +1208,7 @@ void Module::LogMessageVerboseBacktrace(Log *log, const char *format, ...) {
std::string back_trace;
llvm::raw_string_ostream stream(back_trace);
llvm::sys::PrintStackTrace(stream);
- log_message.PutCString(back_trace.c_str());
+ log_message.PutCString(back_trace);
}
log->PutCString(log_message.GetString().c_str());
}
diff --git a/lldb/source/Core/Scalar.cpp b/lldb/source/Core/Scalar.cpp
index 6087f728874..f92b7e6e36e 100644
--- a/lldb/source/Core/Scalar.cpp
+++ b/lldb/source/Core/Scalar.cpp
@@ -289,14 +289,14 @@ void Scalar::GetValue(Stream *s, bool show_type) const {
case e_slonglong:
case e_sint128:
case e_sint256:
- s->PutCString(m_integer.toString(10, true).c_str());
+ s->PutCString(m_integer.toString(10, true));
break;
case e_uint:
case e_ulong:
case e_ulonglong:
case e_uint128:
case e_uint256:
- s->PutCString(m_integer.toString(10, false).c_str());
+ s->PutCString(m_integer.toString(10, false));
break;
case e_float:
case e_double:
diff --git a/lldb/source/Core/SearchFilter.cpp b/lldb/source/Core/SearchFilter.cpp
index 8c4a3feaaae..2dfb26910ee 100644
--- a/lldb/source/Core/SearchFilter.cpp
+++ b/lldb/source/Core/SearchFilter.cpp
@@ -477,7 +477,7 @@ SearchFilterSP SearchFilterByModule::CreateFromStructuredData(
error.SetErrorString("SFBM::CFSD: filter module item not a string.");
return nullptr;
}
- FileSpec module_spec(module.c_str(), false);
+ FileSpec module_spec(module, false);
return SearchFilterSP(
new SearchFilterByModule(target.shared_from_this(), module_spec));
@@ -646,7 +646,7 @@ SearchFilterSP SearchFilterByModuleList::CreateFromStructuredData(
"SFBM::CFSD: filter module item %zu not a string.", i);
return nullptr;
}
- modules.Append(FileSpec(module.c_str(), false));
+ modules.Append(FileSpec(module, false));
}
}
@@ -711,7 +711,7 @@ lldb::SearchFilterSP SearchFilterByModuleListAndCU::CreateFromStructuredData(
"SFBM::CFSD: filter module item %zu not a string.", i);
return result_sp;
}
- modules.Append(FileSpec(module.c_str(), false));
+ modules.Append(FileSpec(module, false));
}
}
@@ -733,7 +733,7 @@ lldb::SearchFilterSP SearchFilterByModuleListAndCU::CreateFromStructuredData(
"SFBM::CFSD: filter cu item %zu not a string.", i);
return nullptr;
}
- cus.Append(FileSpec(cu.c_str(), false));
+ cus.Append(FileSpec(cu, false));
}
return SearchFilterSP(new SearchFilterByModuleListAndCU(
diff --git a/lldb/source/Core/StructuredData.cpp b/lldb/source/Core/StructuredData.cpp
index 46be7828f62..48c368d91c9 100644
--- a/lldb/source/Core/StructuredData.cpp
+++ b/lldb/source/Core/StructuredData.cpp
@@ -181,7 +181,7 @@ StructuredData::Object::GetObjectForDotSeparatedPath(llvm::StringRef path) {
if (this->GetType() == Type::eTypeDictionary) {
std::pair<llvm::StringRef, llvm::StringRef> match = path.split('.');
std::string key = match.first.str();
- ObjectSP value = this->GetAsDictionary()->GetValueForKey(key.c_str());
+ ObjectSP value = this->GetAsDictionary()->GetValueForKey(key);
if (value.get()) {
// Do we have additional words to descend? If not, return the
// value we're at right now.
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index b0e47983178..235f30595b5 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -2034,7 +2034,7 @@ bool ValueObject::GetBaseClassPath(Stream &s) {
if (this_had_base_class) {
if (parent_had_base_class)
s.PutCString("::");
- s.PutCString(cxx_class_name.c_str());
+ s.PutCString(cxx_class_name);
}
return parent_had_base_class || this_had_base_class;
}
OpenPOWER on IntegriCloud