diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-06-12 22:17:38 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-06-12 22:17:38 +0000 |
| commit | ef96e985fcceb096e8ab0e818641f7a9318c704a (patch) | |
| tree | 0c7199fd0d42a7daf910f61f34ae51f386e6a4da /lldb/source/Utility/Reproducer.cpp | |
| parent | 781a0dc58d4c2cfea20eb2a9c62db8ce869fbf15 (diff) | |
| download | llvm-ef96e985fcceb096e8ab0e818641f7a9318c704a.tar.gz llvm-ef96e985fcceb096e8ab0e818641f7a9318c704a.tar.bz2 llvm-ef96e985fcceb096e8ab0e818641f7a9318c704a.zip | |
[Reproducers] Simplify providers with nested Info struct (NFC)
This replaces the `info` typedef with a nested struct named Info. This
means we now have FooProvider and FooProvider::Info, instead of two
related but separate classes FooProvider and FooInfo. This change is
mostly cosmetic.
llvm-svn: 363211
Diffstat (limited to 'lldb/source/Utility/Reproducer.cpp')
| -rw-r--r-- | lldb/source/Utility/Reproducer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Utility/Reproducer.cpp b/lldb/source/Utility/Reproducer.cpp index f5ca39cddc77..6e893c1c95d3 100644 --- a/lldb/source/Utility/Reproducer.cpp +++ b/lldb/source/Utility/Reproducer.cpp @@ -231,7 +231,7 @@ DataRecorder::Create(const FileSpec &filename) { DataRecorder *CommandProvider::GetNewDataRecorder() { std::size_t i = m_data_recorders.size() + 1; - std::string filename = (llvm::Twine(info::name) + llvm::Twine("-") + + std::string filename = (llvm::Twine(Info::name) + llvm::Twine("-") + llvm::Twine(i) + llvm::Twine(".txt")) .str(); auto recorder_or_error = @@ -252,7 +252,7 @@ void CommandProvider::Keep() { files.push_back(recorder->GetFilename().GetPath()); } - FileSpec file = GetRoot().CopyByAppendingPathComponent(info::file); + FileSpec file = GetRoot().CopyByAppendingPathComponent(Info::file); std::error_code ec; llvm::raw_fd_ostream os(file.GetPath(), ec, llvm::sys::fs::F_Text); if (ec) @@ -267,7 +267,7 @@ void ProviderBase::anchor() {} char ProviderBase::ID = 0; char FileProvider::ID = 0; char CommandProvider::ID = 0; -const char *FileInfo::name = "files"; -const char *FileInfo::file = "files.yaml"; -const char *CommandInfo::name = "command-interpreter"; -const char *CommandInfo::file = "command-interpreter.yaml"; +const char *FileProvider::Info::name = "files"; +const char *FileProvider::Info::file = "files.yaml"; +const char *CommandProvider::Info::name = "command-interpreter"; +const char *CommandProvider::Info::file = "command-interpreter.yaml"; |
