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/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | 781a0dc58d4c2cfea20eb2a9c62db8ce869fbf15 (diff) | |
download | bcm5719-llvm-ef96e985fcceb096e8ab0e818641f7a9318c704a.tar.gz bcm5719-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/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 194e79085a0..1c1cecda3b3 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -163,24 +163,19 @@ static const ProcessKDPPropertiesSP &GetGlobalPluginProperties() { return g_settings_sp; } -struct ProcessGDBRemoteInfo { - static const char *name; - static const char *file; -}; - -const char *ProcessGDBRemoteInfo::name = "gdb-remote"; -const char *ProcessGDBRemoteInfo::file = "gdb-remote.yaml"; - class ProcessGDBRemoteProvider : public repro::Provider<ProcessGDBRemoteProvider> { public: - typedef ProcessGDBRemoteInfo info; + struct Info { + static const char *name; + static const char *file; + }; ProcessGDBRemoteProvider(const FileSpec &directory) : Provider(directory) { } raw_ostream *GetHistoryStream() { - FileSpec history_file = GetRoot().CopyByAppendingPathComponent(info::file); + FileSpec history_file = GetRoot().CopyByAppendingPathComponent(Info::file); std::error_code EC; m_stream_up = llvm::make_unique<raw_fd_ostream>(history_file.GetPath(), EC, @@ -204,6 +199,8 @@ private: }; char ProcessGDBRemoteProvider::ID = 0; +const char *ProcessGDBRemoteProvider::Info::name = "gdb-remote"; +const char *ProcessGDBRemoteProvider::Info::file = "gdb-remote.yaml"; } // namespace @@ -3432,7 +3429,7 @@ Status ProcessGDBRemote::ConnectToReplayServer(repro::Loader *loader) { return Status("No loader provided."); // Construct replay history path. - FileSpec history_file = loader->GetFile<ProcessGDBRemoteInfo>(); + FileSpec history_file = loader->GetFile<ProcessGDBRemoteProvider::Info>(); if (!history_file) return Status("No provider for gdb-remote."); |