Skip to content

Commit f49c3e2

Browse files
committed
formatting
1 parent bb22874 commit f49c3e2

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

lldb/include/lldb/Core/Telemetry.h

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
#include <optional>
2727
#include <string>
2828

29-
#include <unordered_map>
29+
#include <functional>
3030
#include <type_traits>
31+
#include <unordered_map>
3132
#include <utility>
32-
#include <functional>
3333

3434
namespace lldb_private {
3535
namespace telemetry {
@@ -41,7 +41,8 @@ namespace telemetry {
4141
// - First two bits (MSB) must be 11 - the common prefix
4242
// - Last two bits (LSB) are reserved for grand-children of LLDBTelemetryInfo
4343
// If any of the subclass has descendents, those descendents
44-
// must have their LLDBEntryKind in the similar form (ie., share common prefix and differ by the last two bits)
44+
// must have their LLDBEntryKind in the similar form (ie., share common prefix
45+
// and differ by the last two bits)
4546
struct LLDBEntryKind : public ::llvm::telemetry::EntryKind {
4647
static const llvm::telemetry::KindType BaseInfo = 0b11000000;
4748
static const llvm::telemetry::KindType DebuggerInfo = 0b11000100;
@@ -87,17 +88,21 @@ struct TargetInfo : public LLDBBaseTelemetryInfo {
8788
std::string target_uuid;
8889
std::string arch_name;
8990

90-
// If true, this entry was emitted at the beginning of an event (eg., before the executable laod). Otherwise, it was emitted at the end of an event (eg., after the module and any dependency were loaded.)
91+
// If true, this entry was emitted at the beginning of an event (eg., before
92+
// the executable laod). Otherwise, it was emitted at the end of an event
93+
// (eg., after the module and any dependency were loaded.)
9194
bool is_start_entry;
9295

9396
// Describes the exit of the executable module.
9497
std::optional<ExitDescription> exit_desc;
9598
TargetInfo() = default;
9699

97-
llvm::telemetry::KindType getKind() const override { return LLDBEntryKind::TargetInfo; }
100+
llvm::telemetry::KindType getKind() const override {
101+
return LLDBEntryKind::TargetInfo;
102+
}
98103

99104
static bool classof(const TelemetryInfo *T) {
100-
// Subclasses of this is also acceptable
105+
// Subclasses of this is also acceptable
101106
return (T->getKind() & LLDBEntryKind::TargetInfo) ==
102107
LLDBEntryKind::TargetInfo;
103108
}
@@ -141,7 +146,7 @@ class TelemetryManager : public llvm::telemetry::Manager {
141146
/// during the action.
142147
///
143148
/// Invoked at the begining of the load of the main-executable.
144-
virtual void AtMainExecutableLoadStart(TargetInfo * entry);
149+
virtual void AtMainExecutableLoadStart(TargetInfo *entry);
145150
/// Invoked at the end of the load.
146151
virtual void AtMainExecutableLoadEnd(TargetInfo *entry);
147152

lldb/source/Target/Process.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,12 +1065,13 @@ const char *Process::GetExitDescription() {
10651065
bool Process::SetExitStatus(int status, llvm::StringRef exit_string) {
10661066
// Use a mutex to protect setting the exit status.
10671067
std::lock_guard<std::mutex> guard(m_exit_status_mutex);
1068-
Debugger* debugger = &(GetTarget().GetDebugger());
1069-
telemetry::ScopedDispatch<telemetry::TargetInfo> helper (debugger);
1068+
Debugger *debugger = &(GetTarget().GetDebugger());
1069+
telemetry::ScopedDispatch<telemetry::TargetInfo> helper(debugger);
10701070
// Save the Module UUID since the Module might be gone by end of scope.
1071-
std::string target_uuid = GetTarget().GetExecutableModule()->GetUUID().GetAsString();
1071+
std::string target_uuid =
1072+
GetTarget().GetExecutableModule()->GetUUID().GetAsString();
10721073

1073-
helper.DispatchNow([&](telemetry::TargetInfo *info){
1074+
helper.DispatchNow([&](telemetry::TargetInfo *info) {
10741075
info->target_uuid = target_uuid;
10751076
info->is_start_entry = true;
10761077
});

lldb/source/Target/Target.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
#include "lldb/Core/Module.h"
2121
#include "lldb/Core/ModuleSpec.h"
2222
#include "lldb/Core/PluginManager.h"
23-
#include "lldb/Core/Telemetry.h"
2423
#include "lldb/Core/SearchFilter.h"
2524
#include "lldb/Core/Section.h"
2625
#include "lldb/Core/SourceManager.h"
2726
#include "lldb/Core/StructuredDataImpl.h"
27+
#include "lldb/Core/Telemetry.h"
2828
#include "lldb/DataFormatters/FormatterSection.h"
2929
#include "lldb/Expression/DiagnosticManager.h"
3030
#include "lldb/Expression/ExpressionVariable.h"
@@ -1575,7 +1575,6 @@ void Target::SetExecutableModule(ModuleSP &executable_sp,
15751575
helper.DispatchOnExit([&](telemetry::TargetInfo *info) {
15761576
info->exec_mod = executable_sp;
15771577
info->target_uuid = executable_sp->GetUUID().GetAsString();
1578-
15791578
});
15801579

15811580
ElapsedTime elapsed(m_stats.GetCreateTime());

0 commit comments

Comments
 (0)