Skip to content

Commit 859bfb6

Browse files
committed
Remove unnecessary print functions from library
1 parent 0b7a2c6 commit 859bfb6

File tree

2 files changed

+50
-57
lines changed

2 files changed

+50
-57
lines changed

llvm/include/llvm/DebugInfo/DWARF/DWARFUnwindTablePrinter.h

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -18,60 +18,10 @@ struct DIDumpOptions;
1818

1919
namespace dwarf {
2020

21-
/// Print an unwind location expression as text and use the register information
22-
/// if some is provided.
23-
///
24-
/// \param R the unwind location to print.
25-
///
26-
/// \param OS the stream to use for output.
27-
///
28-
/// \param MRI register information that helps emit register names insteead
29-
/// of raw register numbers.
30-
///
31-
/// \param IsEH true if the DWARF Call Frame Information is from .eh_frame
32-
/// instead of from .debug_frame. This is needed for register number
33-
/// conversion because some register numbers differ between the two sections
34-
/// for certain architectures like x86.
35-
LLVM_ABI void printUnwindLocation(const UnwindLocation &R, raw_ostream &OS,
36-
DIDumpOptions DumpOpts);
3721
LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, const UnwindLocation &R);
3822

39-
/// Print all registers + locations that are currently defined in a register
40-
/// locations.
41-
///
42-
/// \param RL the register locations to print.
43-
///
44-
/// \param OS the stream to use for output.
45-
///
46-
/// \param MRI register information that helps emit register names insteead
47-
/// of raw register numbers.
48-
///
49-
/// \param IsEH true if the DWARF Call Frame Information is from .eh_frame
50-
/// instead of from .debug_frame. This is needed for register number
51-
/// conversion because some register numbers differ between the two sections
52-
/// for certain architectures like x86.
53-
LLVM_ABI void printRegisterLocations(const RegisterLocations &RL,
54-
raw_ostream &OS, DIDumpOptions DumpOpts);
5523
LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, const RegisterLocations &RL);
5624

57-
/// Print an UnwindRow to the stream.
58-
///
59-
/// \param Row the UnwindRow to print.
60-
///
61-
/// \param OS the stream to use for output.
62-
///
63-
/// \param MRI register information that helps emit register names insteead
64-
/// of raw register numbers.
65-
///
66-
/// \param IsEH true if the DWARF Call Frame Information is from .eh_frame
67-
/// instead of from .debug_frame. This is needed for register number
68-
/// conversion because some register numbers differ between the two sections
69-
/// for certain architectures like x86.
70-
///
71-
/// \param IndentLevel specify the indent level as an integer. The UnwindRow
72-
/// will be output to the stream preceded by 2 * IndentLevel number of spaces.
73-
LLVM_ABI void printUnwindRow(const UnwindRow &Row, raw_ostream &OS,
74-
DIDumpOptions DumpOpts, unsigned IndentLevel = 0);
7525
LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, const UnwindRow &Row);
7626

7727
/// Print a UnwindTable to the stream.

llvm/lib/DebugInfo/DWARF/DWARFUnwindTablePrinter.cpp

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,22 @@ static void printRegister(raw_ostream &OS, DIDumpOptions DumpOpts,
3232
OS << "reg" << RegNum;
3333
}
3434

35-
void llvm::dwarf::printUnwindLocation(const UnwindLocation &UL, raw_ostream &OS,
36-
DIDumpOptions DumpOpts) {
35+
/// Print an unwind location expression as text and use the register information
36+
/// if some is provided.
37+
///
38+
/// \param R the unwind location to print.
39+
///
40+
/// \param OS the stream to use for output.
41+
///
42+
/// \param MRI register information that helps emit register names insteead
43+
/// of raw register numbers.
44+
///
45+
/// \param IsEH true if the DWARF Call Frame Information is from .eh_frame
46+
/// instead of from .debug_frame. This is needed for register number
47+
/// conversion because some register numbers differ between the two sections
48+
/// for certain architectures like x86.
49+
static void printUnwindLocation(const UnwindLocation &UL, raw_ostream &OS,
50+
DIDumpOptions DumpOpts) {
3751
if (UL.getDereference())
3852
OS << '[';
3953
switch (UL.getLocation()) {
@@ -86,9 +100,22 @@ raw_ostream &llvm::dwarf::operator<<(raw_ostream &OS,
86100
return OS;
87101
}
88102

89-
void llvm::dwarf::printRegisterLocations(const RegisterLocations &RL,
90-
raw_ostream &OS,
91-
DIDumpOptions DumpOpts) {
103+
/// Print all registers + locations that are currently defined in a register
104+
/// locations.
105+
///
106+
/// \param RL the register locations to print.
107+
///
108+
/// \param OS the stream to use for output.
109+
///
110+
/// \param MRI register information that helps emit register names insteead
111+
/// of raw register numbers.
112+
///
113+
/// \param IsEH true if the DWARF Call Frame Information is from .eh_frame
114+
/// instead of from .debug_frame. This is needed for register number
115+
/// conversion because some register numbers differ between the two sections
116+
/// for certain architectures like x86.
117+
static void printRegisterLocations(const RegisterLocations &RL, raw_ostream &OS,
118+
DIDumpOptions DumpOpts) {
92119
bool First = true;
93120
for (uint32_t Reg : RL.getRegisters()) {
94121
auto Loc = *RL.getRegisterLocation(Reg);
@@ -109,8 +136,24 @@ raw_ostream &llvm::dwarf::operator<<(raw_ostream &OS,
109136
return OS;
110137
}
111138

112-
void llvm::dwarf::printUnwindRow(const UnwindRow &Row, raw_ostream &OS,
113-
DIDumpOptions DumpOpts, unsigned IndentLevel) {
139+
/// Print an UnwindRow to the stream.
140+
///
141+
/// \param Row the UnwindRow to print.
142+
///
143+
/// \param OS the stream to use for output.
144+
///
145+
/// \param MRI register information that helps emit register names insteead
146+
/// of raw register numbers.
147+
///
148+
/// \param IsEH true if the DWARF Call Frame Information is from .eh_frame
149+
/// instead of from .debug_frame. This is needed for register number
150+
/// conversion because some register numbers differ between the two sections
151+
/// for certain architectures like x86.
152+
///
153+
/// \param IndentLevel specify the indent level as an integer. The UnwindRow
154+
/// will be output to the stream preceded by 2 * IndentLevel number of spaces.
155+
static void printUnwindRow(const UnwindRow &Row, raw_ostream &OS,
156+
DIDumpOptions DumpOpts, unsigned IndentLevel) {
114157
OS.indent(2 * IndentLevel);
115158
if (Row.hasAddress())
116159
OS << format("0x%" PRIx64 ": ", Row.getAddress());

0 commit comments

Comments
 (0)