summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/ModuleCache.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/Utility/ModuleCache.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/Utility/ModuleCache.cpp')
-rw-r--r--lldb/source/Utility/ModuleCache.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lldb/source/Utility/ModuleCache.cpp b/lldb/source/Utility/ModuleCache.cpp
index ed1e7668caa..889cd8f9466 100644
--- a/lldb/source/Utility/ModuleCache.cpp
+++ b/lldb/source/Utility/ModuleCache.cpp
@@ -82,8 +82,7 @@ FileSpec GetModuleDirectory(const FileSpec &root_dir_spec, const UUID &uuid) {
}
FileSpec GetSymbolFileSpec(const FileSpec &module_file_spec) {
- return FileSpec((module_file_spec.GetPath() + kSymFileExtension).c_str(),
- false);
+ return FileSpec(module_file_spec.GetPath() + kSymFileExtension, false);
}
void DeleteExistingModule(const FileSpec &root_dir_spec,
@@ -199,8 +198,8 @@ Error ModuleCache::Put(const FileSpec &root_dir_spec, const char *hostname,
JoinPath(module_spec_dir, target_file.GetFilename().AsCString());
const auto tmp_file_path = tmp_file.GetPath();
- const auto err_code = llvm::sys::fs::rename(
- tmp_file_path.c_str(), module_file_path.GetPath().c_str());
+ const auto err_code =
+ llvm::sys::fs::rename(tmp_file_path, module_file_path.GetPath());
if (err_code)
return Error("Failed to rename file %s to %s: %s", tmp_file_path.c_str(),
module_file_path.GetPath().c_str(),
@@ -295,7 +294,7 @@ Error ModuleCache::GetAndPut(const FileSpec &root_dir_spec,
const auto tmp_download_file_spec = JoinPath(module_spec_dir, kTempFileName);
error = module_downloader(module_spec, tmp_download_file_spec);
- llvm::FileRemover tmp_file_remover(tmp_download_file_spec.GetPath().c_str());
+ llvm::FileRemover tmp_file_remover(tmp_download_file_spec.GetPath());
if (error.Fail())
return Error("Failed to download module: %s", error.AsCString());
@@ -315,8 +314,7 @@ Error ModuleCache::GetAndPut(const FileSpec &root_dir_spec,
const auto tmp_download_sym_file_spec =
JoinPath(module_spec_dir, kTempSymFileName);
error = symfile_downloader(cached_module_sp, tmp_download_sym_file_spec);
- llvm::FileRemover tmp_symfile_remover(
- tmp_download_sym_file_spec.GetPath().c_str());
+ llvm::FileRemover tmp_symfile_remover(tmp_download_sym_file_spec.GetPath());
if (error.Fail())
// Failed to download a symfile but fetching the module was successful. The
// module might
OpenPOWER on IntegriCloud