Skip to content

Commit 479e6b5

Browse files
committed
Add comment why SummaryStatSp isn't forward declared
1 parent dcaeda6 commit 479e6b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/include/lldb/Target/Statistics.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ struct StatisticsOptions {
182182
class SummaryStatistics {
183183
public:
184184
explicit SummaryStatistics(std::string name, std::string impl_type)
185-
: m_total_time(), m_impl_type(std::move(impl_type)),
186-
m_name(std::move(name)), m_count(0) {}
185+
: m_total_time(), m_impl_type(std::move(impl_type)), m_name(std::move(name)), m_count(0) {}
187186

188187
std::string GetName() const { return m_name; };
189188
double GetTotalTime() const { return m_total_time.get().count(); }
@@ -226,6 +225,7 @@ class SummaryStatistics {
226225
std::atomic<uint64_t> m_count;
227226
};
228227

228+
// Declaring here as there is no private forward
229229
typedef std::shared_ptr<SummaryStatistics> SummaryStatisticsSP;
230230

231231
/// A class that wraps a std::map of SummaryStatistics objects behind a mutex.
@@ -237,7 +237,7 @@ class SummaryStatisticsCache {
237237
GetSummaryStatisticsForProvider(lldb_private::TypeSummaryImpl &provider) {
238238
std::lock_guard<std::mutex> guard(m_map_mutex);
239239
if (auto iterator = m_summary_stats_map.find(provider.GetName());
240-
iterator != m_summary_stats_map.end())
240+
iterator != m_summary_stats_map.end())
241241
return iterator->second;
242242

243243
auto it = m_summary_stats_map.try_emplace(

0 commit comments

Comments
 (0)