1
1
#include " lldb/DataFormatters/TypeSummary.h"
2
2
#include " lldb/Target/Statistics.h"
3
+ #include " lldb/Utility/Stream.h"
3
4
#include " lldb/lldb-forward.h"
4
5
#include " lldb/lldb-private-enumerations.h"
5
6
#include " lldb/lldb-private.h"
6
- #include " lldb/Utility/Stream.h"
7
7
#include " llvm/Testing/Support/Error.h"
8
8
#include " gtest/gtest.h"
9
9
#include < thread>
@@ -13,30 +13,23 @@ using Duration = std::chrono::duration<double>;
13
13
14
14
class DummySummaryImpl : public lldb_private ::TypeSummaryImpl {
15
15
public:
16
- DummySummaryImpl (Duration sleepTime):
17
- TypeSummaryImpl (TypeSummaryImpl::Kind::eSummaryString, TypeSummaryImpl::Flags()),
18
- m_sleepTime (sleepTime) {}
16
+ DummySummaryImpl (Duration sleepTime)
17
+ : TypeSummaryImpl(TypeSummaryImpl::Kind::eSummaryString,
18
+ TypeSummaryImpl::Flags ()),
19
+ m_sleepTime(sleepTime) {}
19
20
20
- std::string GetName () override {
21
- return " DummySummary" ;
22
- }
21
+ std::string GetName () override { return " DummySummary" ; }
23
22
24
- std::string GetSummaryKindName () override {
25
- return " dummy" ;
26
- }
23
+ std::string GetSummaryKindName () override { return " dummy" ; }
27
24
28
- std::string GetDescription () override {
29
- return " " ;
30
- }
25
+ std::string GetDescription () override { return " " ; }
31
26
32
27
bool FormatObject (ValueObject *valobj, std::string &dest,
33
28
const TypeSummaryOptions &options) override {
34
29
return false ;
35
30
}
36
31
37
- void FakeFormat () {
38
- std::this_thread::sleep_for (m_sleepTime);
39
- }
32
+ void FakeFormat () { std::this_thread::sleep_for (m_sleepTime); }
40
33
41
34
private:
42
35
Duration m_sleepTime;
@@ -56,7 +49,7 @@ TEST(MultithreadFormatting, Multithread) {
56
49
}));
57
50
}
58
51
59
- for (auto &thread : threads)
52
+ for (auto &thread : threads)
60
53
thread.join ();
61
54
62
55
auto sp = statistics_cache.GetSummaryStatisticsForProvider (summary);
0 commit comments