Skip to content

Commit 96cb23f

Browse files
committed
[llvm] clang-format changes to DWARFLinker, DWP, and Demangle libraries
1 parent b4cc902 commit 96cb23f

File tree

6 files changed

+43
-33
lines changed

6 files changed

+43
-33
lines changed

llvm/include/llvm/DWARFLinker/Classic/DWARFLinker.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#ifndef LLVM_DWARFLINKER_CLASSIC_DWARFLINKER_H
1010
#define LLVM_DWARFLINKER_CLASSIC_DWARFLINKER_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/ADT/AddressRanges.h"
1413
#include "llvm/ADT/DenseMap.h"
1514
#include "llvm/CodeGen/AccelTable.h"
@@ -22,6 +21,7 @@
2221
#include "llvm/DebugInfo/DWARF/DWARFDebugRangeList.h"
2322
#include "llvm/DebugInfo/DWARF/DWARFDie.h"
2423
#include "llvm/DebugInfo/DWARF/DWARFExpression.h"
24+
#include "llvm/Support/Compiler.h"
2525
#include <map>
2626

2727
namespace llvm {
@@ -588,27 +588,30 @@ class LLVM_ABI DWARFLinker : public DWARFLinkerBase {
588588
/// \param Die the output DIE to use, pass NULL to create one.
589589
/// \returns the root of the cloned tree or null if nothing was selected.
590590
LLVM_ABI DIE *cloneDIE(const DWARFDie &InputDIE, const DWARFFile &File,
591-
CompileUnit &U, int64_t PCOffset, uint32_t OutOffset,
592-
unsigned Flags, bool IsLittleEndian, DIE *Die = nullptr);
591+
CompileUnit &U, int64_t PCOffset, uint32_t OutOffset,
592+
unsigned Flags, bool IsLittleEndian,
593+
DIE *Die = nullptr);
593594

594595
/// Construct the output DIE tree by cloning the DIEs we
595596
/// chose to keep above. If there are no valid relocs, then there's
596597
/// nothing to clone/emit.
597598
LLVM_ABI uint64_t cloneAllCompileUnits(DWARFContext &DwarfContext,
598-
const DWARFFile &File, bool IsLittleEndian);
599+
const DWARFFile &File,
600+
bool IsLittleEndian);
599601

600602
/// Emit the .debug_addr section for the \p Unit.
601603
LLVM_ABI void emitDebugAddrSection(CompileUnit &Unit,
602-
const uint16_t DwarfVersion) const;
604+
const uint16_t DwarfVersion) const;
603605

604606
using ExpressionHandlerRef = function_ref<void(
605607
SmallVectorImpl<uint8_t> &, SmallVectorImpl<uint8_t> &,
606608
int64_t AddrRelocAdjustment)>;
607609

608610
/// Compute and emit debug locations (.debug_loc, .debug_loclists)
609611
/// for \p Unit, patch the attributes referencing it.
610-
LLVM_ABI void generateUnitLocations(CompileUnit &Unit, const DWARFFile &File,
611-
ExpressionHandlerRef ExprHandler);
612+
LLVM_ABI void generateUnitLocations(CompileUnit &Unit,
613+
const DWARFFile &File,
614+
ExpressionHandlerRef ExprHandler);
612615

613616
private:
614617
using AttributeSpec = DWARFAbbreviationDeclaration::AttributeSpec;

llvm/include/llvm/DWARFLinker/Classic/DWARFLinkerCompileUnit.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
#ifndef LLVM_DWARFLINKER_CLASSIC_DWARFLINKERCOMPILEUNIT_H
1010
#define LLVM_DWARFLINKER_CLASSIC_DWARFLINKERCOMPILEUNIT_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/ADT/AddressRanges.h"
1413
#include "llvm/ADT/DenseMap.h"
1514
#include "llvm/CodeGen/DIE.h"
1615
#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
16+
#include "llvm/Support/Compiler.h"
1717
#include <optional>
1818

1919
namespace llvm {
@@ -198,7 +198,7 @@ class CompileUnit {
198198
/// offset of \p Die in the debug_info section or to the canonical offset of
199199
/// \p Ctxt if it is non-null.
200200
LLVM_ABI void noteForwardReference(DIE *Die, const CompileUnit *RefUnit,
201-
DeclContext *Ctxt, PatchLocation Attr);
201+
DeclContext *Ctxt, PatchLocation Attr);
202202

203203
/// Apply all fixups recorded by noteForwardReference().
204204
LLVM_ABI void fixupForwardReferences();
@@ -209,7 +209,8 @@ class CompileUnit {
209209

210210
/// Add a function range [\p LowPC, \p HighPC) that is relocated by applying
211211
/// offset \p PCOffset.
212-
LLVM_ABI void addFunctionRange(uint64_t LowPC, uint64_t HighPC, int64_t PCOffset);
212+
LLVM_ABI void addFunctionRange(uint64_t LowPC, uint64_t HighPC,
213+
int64_t PCOffset);
213214

214215
/// Keep track of a DW_AT_range attribute that we will need to patch up later.
215216
LLVM_ABI void noteRangeAttribute(const DIE &Die, PatchLocation Attr);
@@ -223,23 +224,24 @@ class CompileUnit {
223224
LLVM_ABI void noteStmtSeqListAttribute(PatchLocation Attr);
224225

225226
/// Add a name accelerator entry for \a Die with \a Name.
226-
LLVM_ABI void addNamespaceAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name);
227+
LLVM_ABI void addNamespaceAccelerator(const DIE *Die,
228+
DwarfStringPoolEntryRef Name);
227229

228230
/// Add a name accelerator entry for \a Die with \a Name.
229231
LLVM_ABI void addNameAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name,
230-
bool SkipPubnamesSection = false);
232+
bool SkipPubnamesSection = false);
231233

232234
/// Add various accelerator entries for \p Die with \p Name which is stored
233235
/// in the string table at \p Offset. \p Name must be an Objective-C
234236
/// selector.
235237
LLVM_ABI void addObjCAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name,
236-
bool SkipPubnamesSection = false);
238+
bool SkipPubnamesSection = false);
237239

238240
/// Add a type accelerator entry for \p Die with \p Name which is stored in
239241
/// the string table at \p Offset.
240242
LLVM_ABI void addTypeAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name,
241-
bool ObjcClassImplementation,
242-
uint32_t QualifiedNameHash);
243+
bool ObjcClassImplementation,
244+
uint32_t QualifiedNameHash);
243245

244246
struct AccelInfo {
245247
/// Name of the entry.

llvm/include/llvm/DWARFLinker/Classic/DWARFStreamer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#ifndef LLVM_DWARFLINKER_CLASSIC_DWARFSTREAMER_H
1010
#define LLVM_DWARFLINKER_CLASSIC_DWARFSTREAMER_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "DWARFLinker.h"
1413
#include "llvm/BinaryFormat/Swift.h"
1514
#include "llvm/CodeGen/AsmPrinter.h"
@@ -19,6 +18,7 @@
1918
#include "llvm/MC/MCObjectFileInfo.h"
2019
#include "llvm/MC/MCRegisterInfo.h"
2120
#include "llvm/MC/MCSubtargetInfo.h"
21+
#include "llvm/Support/Compiler.h"
2222
#include "llvm/Target/TargetMachine.h"
2323

2424
namespace llvm {

llvm/include/llvm/DWARFLinker/DWARFLinkerBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#ifndef LLVM_DWARFLINKER_DWARFLINKERBASE_H
1010
#define LLVM_DWARFLINKER_DWARFLINKERBASE_H
11-
#include "llvm/Support/Compiler.h"
1211
#include "AddressesMap.h"
1312
#include "DWARFFile.h"
1413
#include "llvm/ADT/AddressRanges.h"
@@ -18,6 +17,7 @@
1817
#include "llvm/DebugInfo/DWARF/DWARFDebugRangeList.h"
1918
#include "llvm/DebugInfo/DWARF/DWARFDie.h"
2019
#include "llvm/DebugInfo/DWARF/DWARFExpression.h"
20+
#include "llvm/Support/Compiler.h"
2121
#include <map>
2222
namespace llvm {
2323
class DWARFUnit;

llvm/include/llvm/DWARFLinker/Parallel/DWARFLinker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
#ifndef LLVM_DWARFLINKER_PARALLEL_DWARFLINKER_H
1010
#define LLVM_DWARFLINKER_PARALLEL_DWARFLINKER_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/CodeGen/AsmPrinter.h"
1413
#include "llvm/DWARFLinker/DWARFFile.h"
1514
#include "llvm/DWARFLinker/DWARFLinkerBase.h"
1615
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
1716
#include "llvm/DebugInfo/DWARF/DWARFDie.h"
1817
#include "llvm/MC/MCDwarf.h"
18+
#include "llvm/Support/Compiler.h"
1919
#include "llvm/TargetParser/Triple.h"
2020

2121
/// ------------------------------------------------------------------

llvm/include/llvm/DWP/DWP.h

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef LLVM_DWP_DWP_H
22
#define LLVM_DWP_DWP_H
33

4-
#include "llvm/Support/Compiler.h"
54
#include "DWPStringPool.h"
65
#include "llvm/ADT/ArrayRef.h"
76
#include "llvm/ADT/MapVector.h"
@@ -11,6 +10,7 @@
1110
#include "llvm/MC/MCSection.h"
1211
#include "llvm/MC/MCStreamer.h"
1312
#include "llvm/Object/ObjectFile.h"
13+
#include "llvm/Support/Compiler.h"
1414
#include "llvm/Support/Error.h"
1515
#include <deque>
1616
#include <vector>
@@ -68,9 +68,10 @@ struct CompileUnitIdentifiers {
6868
};
6969

7070
LLVM_ABI Error write(MCStreamer &Out, ArrayRef<std::string> Inputs,
71-
OnCuIndexOverflow OverflowOptValue);
71+
OnCuIndexOverflow OverflowOptValue);
7272

73-
LLVM_ABI unsigned getContributionIndex(DWARFSectionKind Kind, uint32_t IndexVersion);
73+
LLVM_ABI unsigned getContributionIndex(DWARFSectionKind Kind,
74+
uint32_t IndexVersion);
7475

7576
LLVM_ABI Error handleSection(
7677
const StringMap<std::pair<MCSection *, DWARFSectionKind>> &KnownSections,
@@ -86,20 +87,24 @@ LLVM_ABI Error handleSection(
8687
StringRef &CurCUIndexSection, StringRef &CurTUIndexSection,
8788
std::vector<std::pair<DWARFSectionKind, uint32_t>> &SectionLength);
8889

89-
LLVM_ABI Expected<InfoSectionUnitHeader> parseInfoSectionUnitHeader(StringRef Info);
90+
LLVM_ABI Expected<InfoSectionUnitHeader>
91+
parseInfoSectionUnitHeader(StringRef Info);
9092

9193
LLVM_ABI void writeStringsAndOffsets(MCStreamer &Out, DWPStringPool &Strings,
92-
MCSection *StrOffsetSection,
93-
StringRef CurStrSection,
94-
StringRef CurStrOffsetSection, uint16_t Version);
95-
96-
LLVM_ABI Error buildDuplicateError(const std::pair<uint64_t, UnitIndexEntry> &PrevE,
97-
const CompileUnitIdentifiers &ID, StringRef DWPName);
98-
99-
LLVM_ABI void writeIndex(MCStreamer &Out, MCSection *Section,
100-
ArrayRef<unsigned> ContributionOffsets,
101-
const MapVector<uint64_t, UnitIndexEntry> &IndexEntries,
102-
uint32_t IndexVersion);
94+
MCSection *StrOffsetSection,
95+
StringRef CurStrSection,
96+
StringRef CurStrOffsetSection,
97+
uint16_t Version);
98+
99+
LLVM_ABI Error
100+
buildDuplicateError(const std::pair<uint64_t, UnitIndexEntry> &PrevE,
101+
const CompileUnitIdentifiers &ID, StringRef DWPName);
102+
103+
LLVM_ABI void
104+
writeIndex(MCStreamer &Out, MCSection *Section,
105+
ArrayRef<unsigned> ContributionOffsets,
106+
const MapVector<uint64_t, UnitIndexEntry> &IndexEntries,
107+
uint32_t IndexVersion);
103108

104109
} // namespace llvm
105110
#endif // LLVM_DWP_DWP_H

0 commit comments

Comments
 (0)