Skip to content

Commit 4f9b242

Browse files
committed
fixup! clang-format
1 parent 6fa2b6e commit 4f9b242

File tree

7 files changed

+83
-68
lines changed

7 files changed

+83
-68
lines changed

lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ void AppleDWARFIndex::SearchFor(const llvm::AppleAcceleratorTable &table,
136136
}
137137

138138
void AppleDWARFIndex::GetGlobalVariables(
139-
ConstString basename, llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
139+
ConstString basename,
140+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
140141
if (!m_apple_names_up)
141142
return;
142143
SearchFor(*m_apple_names_up, basename, IterationActionAdaptor(callback));
@@ -148,7 +149,8 @@ void AppleDWARFIndex::GetGlobalVariables(
148149
if (!m_apple_names_up)
149150
return;
150151

151-
DIERefCallbackImpl converted_cb = DIERefCallback(IterationActionAdaptor(callback), regex.GetText());
152+
DIERefCallbackImpl converted_cb =
153+
DIERefCallback(IterationActionAdaptor(callback), regex.GetText());
152154

153155
for (const auto &entry : m_apple_names_up->entries())
154156
if (std::optional<llvm::StringRef> name = entry.readName();
@@ -169,7 +171,8 @@ void AppleDWARFIndex::GetGlobalVariables(
169171
return val.has_value() && *val >= lower_bound && *val < upper_bound;
170172
};
171173

172-
DIERefCallbackImpl converted_cb = DIERefCallback(IterationActionAdaptor(callback));
174+
DIERefCallbackImpl converted_cb =
175+
DIERefCallback(IterationActionAdaptor(callback));
173176
for (auto entry : m_apple_names_up->entries()) {
174177
if (is_in_range(entry.BaseEntry.getDIESectionOffset()))
175178
if (!converted_cb(entry.BaseEntry))
@@ -267,7 +270,8 @@ void AppleDWARFIndex::GetTypes(
267270
}
268271

269272
void AppleDWARFIndex::GetNamespaces(
270-
ConstString name, llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
273+
ConstString name,
274+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
271275
if (!m_apple_namespaces_up)
272276
return;
273277
SearchFor(*m_apple_namespaces_up, name, IterationActionAdaptor(callback));

lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ class AppleDWARFIndex : public DWARFIndex {
4141

4242
void Preload() override {}
4343

44-
void
45-
GetGlobalVariables(ConstString basename,
46-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
47-
void
48-
GetGlobalVariables(const RegularExpression &regex,
49-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
50-
void
51-
GetGlobalVariables(DWARFUnit &cu,
52-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
44+
void GetGlobalVariables(
45+
ConstString basename,
46+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
47+
void GetGlobalVariables(
48+
const RegularExpression &regex,
49+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
50+
void GetGlobalVariables(
51+
DWARFUnit &cu,
52+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
5353
void GetObjCMethods(ConstString class_name,
5454
llvm::function_ref<bool(DWARFDIE die)> callback) override;
5555
void GetCompleteObjCClass(
@@ -59,8 +59,9 @@ class AppleDWARFIndex : public DWARFIndex {
5959
llvm::function_ref<bool(DWARFDIE die)> callback) override;
6060
void GetTypes(const DWARFDeclContext &context,
6161
llvm::function_ref<bool(DWARFDIE die)> callback) override;
62-
void GetNamespaces(ConstString name,
63-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
62+
void GetNamespaces(
63+
ConstString name,
64+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
6465
void GetFunctions(
6566
const Module::LookupInfo &lookup_info, SymbolFileDWARF &dwarf,
6667
const CompilerDeclContext &parent_decl_ctx,

lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.h

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ class DWARFIndex {
3333
/// Finds global variables with the given base name. Any additional filtering
3434
/// (e.g., to only retrieve variables from a given context) should be done by
3535
/// the consumer.
36-
virtual void
37-
GetGlobalVariables(ConstString basename,
38-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) = 0;
36+
virtual void GetGlobalVariables(
37+
ConstString basename,
38+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) = 0;
3939

40-
virtual void
41-
GetGlobalVariables(const RegularExpression &regex,
42-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) = 0;
40+
virtual void GetGlobalVariables(
41+
const RegularExpression &regex,
42+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) = 0;
4343
/// \a cu must be the skeleton unit if possible, not GetNonSkeletonUnit().
44-
virtual void
45-
GetGlobalVariables(DWARFUnit &cu,
46-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) = 0;
44+
virtual void GetGlobalVariables(
45+
DWARFUnit &cu,
46+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) = 0;
4747
virtual void
4848
GetObjCMethods(ConstString class_name,
4949
llvm::function_ref<bool(DWARFDIE die)> callback) = 0;
@@ -76,10 +76,9 @@ class DWARFIndex {
7676
/// parent_decl_ctx in its decl parent chain. A base implementation
7777
/// is provided. Specializations should override this if they are able to
7878
/// provide a faster implementation.
79-
virtual void
80-
GetNamespacesWithParents(ConstString name,
81-
const CompilerDeclContext &parent_decl_ctx,
82-
llvm::function_ref<IterationAction(DWARFDIE die)> callback);
79+
virtual void GetNamespacesWithParents(
80+
ConstString name, const CompilerDeclContext &parent_decl_ctx,
81+
llvm::function_ref<IterationAction(DWARFDIE die)> callback);
8382
virtual void
8483
GetFunctions(const Module::LookupInfo &lookup_info, SymbolFileDWARF &dwarf,
8584
const CompilerDeclContext &parent_decl_ctx,

lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ void DebugNamesDWARFIndex::MaybeLogLookupError(llvm::Error error,
178178
}
179179

180180
void DebugNamesDWARFIndex::GetGlobalVariables(
181-
ConstString basename, llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
181+
ConstString basename,
182+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
182183
for (const DebugNames::Entry &entry :
183184
m_debug_names_up->equal_range(basename.GetStringRef())) {
184185
if (entry.tag() != DW_TAG_variable)
@@ -482,7 +483,8 @@ void DebugNamesDWARFIndex::GetTypes(
482483
}
483484

484485
void DebugNamesDWARFIndex::GetNamespaces(
485-
ConstString name, llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
486+
ConstString name,
487+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
486488
for (const DebugNames::Entry &entry :
487489
m_debug_names_up->equal_range(name.GetStringRef())) {
488490
llvm::dwarf::Tag entry_tag = entry.tag();
@@ -583,20 +585,21 @@ void DebugNamesDWARFIndex::GetNamespacesWithParents(
583585
if (!parent_chain) {
584586
// Fallback: use the base class implementation.
585587
if (!ProcessEntry(entry, IterationActionAdaptor([&](DWARFDIE die) {
586-
return ProcessNamespaceDieMatchParents(parent_decl_ctx, die,
587-
callback);
588-
})))
588+
return ProcessNamespaceDieMatchParents(
589+
parent_decl_ctx, die, callback);
590+
})))
589591
return;
590592
continue;
591593
}
592594

593595
if (WithinParentChain(parent_named_contexts, *parent_chain)) {
594596
if (!ProcessEntry(entry, IterationActionAdaptor([&](DWARFDIE die) {
595-
// After .debug_names filtering still sending to base class for
596-
// further filtering before calling the callback.
597-
return ProcessNamespaceDieMatchParents(parent_decl_ctx, die,
598-
callback);
599-
})))
597+
// After .debug_names filtering still sending to
598+
// base class for further filtering before calling
599+
// the callback.
600+
return ProcessNamespaceDieMatchParents(
601+
parent_decl_ctx, die, callback);
602+
})))
600603
// If the callback returns false, we're done.
601604
return;
602605
}

lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ class DebugNamesDWARFIndex : public DWARFIndex {
2727

2828
void Preload() override { m_fallback.Preload(); }
2929

30-
void
31-
GetGlobalVariables(ConstString basename,
32-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
33-
void
34-
GetGlobalVariables(const RegularExpression &regex,
35-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
36-
void
37-
GetGlobalVariables(DWARFUnit &cu,
38-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
30+
void GetGlobalVariables(
31+
ConstString basename,
32+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
33+
void GetGlobalVariables(
34+
const RegularExpression &regex,
35+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
36+
void GetGlobalVariables(
37+
DWARFUnit &cu,
38+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
3939
void
4040
GetObjCMethods(ConstString class_name,
4141
llvm::function_ref<bool(DWARFDIE die)> callback) override {}
@@ -51,8 +51,9 @@ class DebugNamesDWARFIndex : public DWARFIndex {
5151
llvm::function_ref<bool(DWARFDIE die)> callback) override;
5252
void GetTypes(const DWARFDeclContext &context,
5353
llvm::function_ref<bool(DWARFDIE die)> callback) override;
54-
void GetNamespaces(ConstString name,
55-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
54+
void GetNamespaces(
55+
ConstString name,
56+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
5657
void
5758
GetTypesWithQuery(TypeQuery &query,
5859
llvm::function_ref<bool(DWARFDIE die)> callback) override;

lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -414,23 +414,27 @@ void ManualDWARFIndex::IndexUnitImpl(DWARFUnit &unit,
414414
}
415415

416416
void ManualDWARFIndex::GetGlobalVariables(
417-
ConstString basename, llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
417+
ConstString basename,
418+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
418419
Index();
419-
m_set.globals.Find(basename,
420-
DIERefCallback(IterationActionAdaptor(callback), basename.GetStringRef()));
420+
m_set.globals.Find(basename, DIERefCallback(IterationActionAdaptor(callback),
421+
basename.GetStringRef()));
421422
}
422423

423424
void ManualDWARFIndex::GetGlobalVariables(
424425
const RegularExpression &regex,
425426
llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
426427
Index();
427-
m_set.globals.Find(regex, DIERefCallback(IterationActionAdaptor(callback), regex.GetText()));
428+
m_set.globals.Find(
429+
regex, DIERefCallback(IterationActionAdaptor(callback), regex.GetText()));
428430
}
429431

430432
void ManualDWARFIndex::GetGlobalVariables(
431-
DWARFUnit &unit, llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
433+
DWARFUnit &unit,
434+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
432435
Index();
433-
m_set.globals.FindAllEntriesForUnit(unit, DIERefCallback(IterationActionAdaptor(callback)));
436+
m_set.globals.FindAllEntriesForUnit(
437+
unit, DIERefCallback(IterationActionAdaptor(callback)));
434438
}
435439

436440
void ManualDWARFIndex::GetObjCMethods(
@@ -464,9 +468,11 @@ void ManualDWARFIndex::GetTypes(
464468
}
465469

466470
void ManualDWARFIndex::GetNamespaces(
467-
ConstString name, llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
471+
ConstString name,
472+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
468473
Index();
469-
m_set.namespaces.Find(name, DIERefCallback(IterationActionAdaptor(callback), name.GetStringRef()));
474+
m_set.namespaces.Find(name, DIERefCallback(IterationActionAdaptor(callback),
475+
name.GetStringRef()));
470476
}
471477

472478
void ManualDWARFIndex::GetFunctions(

lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ class ManualDWARFIndex : public DWARFIndex {
3131

3232
void Preload() override { Index(); }
3333

34-
void
35-
GetGlobalVariables(ConstString basename,
36-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
37-
void
38-
GetGlobalVariables(const RegularExpression &regex,
39-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
40-
void
41-
GetGlobalVariables(DWARFUnit &unit,
42-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
34+
void GetGlobalVariables(
35+
ConstString basename,
36+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
37+
void GetGlobalVariables(
38+
const RegularExpression &regex,
39+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
40+
void GetGlobalVariables(
41+
DWARFUnit &unit,
42+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
4343
void GetObjCMethods(ConstString class_name,
4444
llvm::function_ref<bool(DWARFDIE die)> callback) override;
4545
void GetCompleteObjCClass(
@@ -49,8 +49,9 @@ class ManualDWARFIndex : public DWARFIndex {
4949
llvm::function_ref<bool(DWARFDIE die)> callback) override;
5050
void GetTypes(const DWARFDeclContext &context,
5151
llvm::function_ref<bool(DWARFDIE die)> callback) override;
52-
void GetNamespaces(ConstString name,
53-
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
52+
void GetNamespaces(
53+
ConstString name,
54+
llvm::function_ref<IterationAction(DWARFDIE die)> callback) override;
5455
void GetFunctions(
5556
const Module::LookupInfo &lookup_info, SymbolFileDWARF &dwarf,
5657
const CompilerDeclContext &parent_decl_ctx,

0 commit comments

Comments
 (0)