summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectPlatform.cpp
diff options
context:
space:
mode:
authorMalcolm Parsons <malcolm.parsons@gmail.com>2016-11-02 20:34:10 +0000
committerMalcolm Parsons <malcolm.parsons@gmail.com>2016-11-02 20:34:10 +0000
commit771ef6d4f15452d76387cd66552a38122be60925 (patch)
tree78449c43ffd29ef2bd0801c9f8bf80fced0ef3e4 /lldb/source/Commands/CommandObjectPlatform.cpp
parent7463adadbf0ab2742b122a3d4adc8e2041c3ac01 (diff)
downloadbcm5719-llvm-771ef6d4f15452d76387cd66552a38122be60925.tar.gz
bcm5719-llvm-771ef6d4f15452d76387cd66552a38122be60925.zip
Fix Clang-tidy readability-redundant-string-cstr warnings
Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
Diffstat (limited to 'lldb/source/Commands/CommandObjectPlatform.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectPlatform.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp
index e4cd5a4d70e..80e21f77d47 100644
--- a/lldb/source/Commands/CommandObjectPlatform.cpp
+++ b/lldb/source/Commands/CommandObjectPlatform.cpp
@@ -550,7 +550,7 @@ public:
perms = lldb::eFilePermissionsUserRW | lldb::eFilePermissionsGroupRW |
lldb::eFilePermissionsWorldRead;
lldb::user_id_t fd = platform_sp->OpenFile(
- FileSpec(cmd_line.c_str(), false),
+ FileSpec(cmd_line, false),
File::eOpenOptionRead | File::eOpenOptionWrite |
File::eOpenOptionAppend | File::eOpenOptionCanCreate,
perms, error);
@@ -957,7 +957,7 @@ public:
if (platform_sp) {
std::string remote_file_path(args.GetArgumentAtIndex(0));
user_id_t size =
- platform_sp->GetFileSize(FileSpec(remote_file_path.c_str(), false));
+ platform_sp->GetFileSize(FileSpec(remote_file_path, false));
if (size != UINT64_MAX) {
result.AppendMessageWithFormat("File size of %s (remote): %" PRIu64
"\n",
@@ -1793,7 +1793,7 @@ public:
error = (platform_sp->RunShellCommand(expr, working_dir, &status, &signo,
&output, m_options.timeout));
if (!output.empty())
- result.GetOutputStream().PutCString(output.c_str());
+ result.GetOutputStream().PutCString(output);
if (status > 0) {
if (signo > 0) {
const char *signo_cstr = Host::GetSignalAsCString(signo);
OpenPOWER on IntegriCloud