Skip to content

Commit 10624e6

Browse files
[BOLT] Fix warnings
bolt/lib/Passes/NonPacProtectedRetAnalysis.cpp:62:13: error: unused function 'traceInst' [-Werror,-Wunused-function] bolt/lib/Passes/NonPacProtectedRetAnalysis.cpp:68:13: error: unused function 'traceReg' [-Werror,-Wunused-function] bolt/lib/Passes/NonPacProtectedRetAnalysis.cpp:80:13: error: unused function 'traceRegMask' [-Werror,-Wunused-function]
1 parent 73cd84a commit 10624e6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bolt/lib/Passes/NonPacProtectedRetAnalysis.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ raw_ostream &operator<<(raw_ostream &OS, const MCInstReference &Ref) {
5959

6060
namespace NonPacProtectedRetAnalysis {
6161

62-
static void traceInst(const BinaryContext &BC, StringRef Label,
63-
const MCInst &MI) {
62+
[[maybe_unused]] static void traceInst(const BinaryContext &BC, StringRef Label,
63+
const MCInst &MI) {
6464
dbgs() << " " << Label << ": ";
6565
BC.printInstruction(dbgs(), MI);
6666
}
6767

68-
static void traceReg(const BinaryContext &BC, StringRef Label,
69-
ErrorOr<MCPhysReg> Reg) {
68+
[[maybe_unused]] static void traceReg(const BinaryContext &BC, StringRef Label,
69+
ErrorOr<MCPhysReg> Reg) {
7070
dbgs() << " " << Label << ": ";
7171
if (Reg.getError())
7272
dbgs() << "(error)";
@@ -77,8 +77,8 @@ static void traceReg(const BinaryContext &BC, StringRef Label,
7777
dbgs() << "\n";
7878
}
7979

80-
static void traceRegMask(const BinaryContext &BC, StringRef Label,
81-
BitVector Mask) {
80+
[[maybe_unused]] static void traceRegMask(const BinaryContext &BC,
81+
StringRef Label, BitVector Mask) {
8282
dbgs() << " " << Label << ": ";
8383
RegStatePrinter(BC).print(dbgs(), Mask);
8484
dbgs() << "\n";

0 commit comments

Comments
 (0)