[Lldb-commits] [lldb] r366966 - [FileCollector] Change coding style from LLDB to LLVM (NFC)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 24 17:17:39 PDT 2019
Author: jdevlieghere
Date: Wed Jul 24 17:17:39 2019
New Revision: 366966
URL: http://llvm.org/viewvc/llvm-project?rev=366966&view=rev
Log:
[FileCollector] Change coding style from LLDB to LLVM (NFC)
This patch changes the coding style of the FileCollector from the LLDB
to the LLVM coding style. Alex recently lifted it into LLVM and I
volunteered to do the conversion.
Modified:
lldb/trunk/include/lldb/Utility/FileCollector.h
lldb/trunk/include/lldb/Utility/Reproducer.h
lldb/trunk/source/Host/common/FileSystem.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h
Modified: lldb/trunk/include/lldb/Utility/FileCollector.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/FileCollector.h?rev=366966&r1=366965&r2=366966&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/FileCollector.h (original)
+++ lldb/trunk/include/lldb/Utility/FileCollector.h Wed Jul 24 17:17:39 2019
@@ -22,17 +22,17 @@ public:
FileCollector(const FileSpec &root, const FileSpec &overlay) :
llvm::FileCollector(root.GetPath(), overlay.GetPath()) {}
- using llvm::FileCollector::AddFile;
+ using llvm::FileCollector::addFile;
- void AddFile(const FileSpec &file) {
- std::string path = file.GetPath();
- llvm::FileCollector::AddFile(path);
+ void addFile(const FileSpec &file) {
+ std::string path = file.GetPath();
+ llvm::FileCollector::addFile(path);
}
/// Write the yaml mapping (for the VFS) to the given file.
- std::error_code WriteMapping(const FileSpec &mapping_file) {
+ std::error_code writeMapping(const FileSpec &mapping_file) {
std::string path = mapping_file.GetPath();
- return llvm::FileCollector::WriteMapping(path);
+ return llvm::FileCollector::writeMapping(path);
}
};
Modified: lldb/trunk/include/lldb/Utility/Reproducer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Reproducer.h?rev=366966&r1=366965&r2=366966&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Reproducer.h (original)
+++ lldb/trunk/include/lldb/Utility/Reproducer.h Wed Jul 24 17:17:39 2019
@@ -99,9 +99,9 @@ public:
void Keep() override {
auto mapping = GetRoot().CopyByAppendingPathComponent(Info::file);
// Temporary files that are removed during execution can cause copy errors.
- if (auto ec = m_collector.CopyFiles(/*stop_on_error=*/false))
+ if (auto ec = m_collector.copyFiles(/*stop_on_error=*/false))
return;
- m_collector.WriteMapping(mapping);
+ m_collector.writeMapping(mapping);
}
static char ID;
Modified: lldb/trunk/source/Host/common/FileSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/FileSystem.cpp?rev=366966&r1=366965&r2=366966&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/FileSystem.cpp (original)
+++ lldb/trunk/source/Host/common/FileSystem.cpp Wed Jul 24 17:17:39 2019
@@ -280,7 +280,7 @@ std::shared_ptr<DataBufferLLVM>
FileSystem::CreateDataBuffer(const llvm::Twine &path, uint64_t size,
uint64_t offset) {
if (m_collector)
- m_collector->AddFile(path);
+ m_collector->addFile(path);
const bool is_volatile = !IsLocal(path);
const ErrorOr<std::string> external_path = GetExternalPath(path);
@@ -418,7 +418,7 @@ static mode_t GetOpenMode(uint32_t permi
Status FileSystem::Open(File &File, const FileSpec &file_spec, uint32_t options,
uint32_t permissions, bool should_close_fd) {
if (m_collector)
- m_collector->AddFile(file_spec);
+ m_collector->addFile(file_spec);
if (File.IsValid())
File.Close();
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h?rev=366966&r1=366965&r2=366966&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h Wed Jul 24 17:17:39 2019
@@ -23,7 +23,7 @@ public:
void addFile(llvm::StringRef Filename,
llvm::StringRef FileDst = {}) override {
- m_file_collector.AddFile(Filename);
+ m_file_collector.addFile(Filename);
}
bool insertSeen(llvm::StringRef Filename) override { return false; }
More information about the lldb-commits
mailing list