Skip to content

Commit 4728a47

Browse files
committed
traceReg(): accept MCPhysReg arg instead of ErrorOr<MCPhysReg>
1 parent c73d6fd commit 4728a47

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

bolt/lib/Passes/PAuthGadgetScanner.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@ namespace PAuthGadgetScanner {
6666
}
6767

6868
[[maybe_unused]] static void traceReg(const BinaryContext &BC, StringRef Label,
69-
ErrorOr<MCPhysReg> Reg) {
69+
MCPhysReg Reg) {
7070
dbgs() << " " << Label << ": ";
71-
if (Reg.getError())
72-
dbgs() << "(error)";
73-
else if (*Reg == BC.MIB->getNoRegister())
71+
if (Reg == BC.MIB->getNoRegister())
7472
dbgs() << "(none)";
7573
else
76-
dbgs() << BC.MRI->getName(*Reg);
74+
dbgs() << BC.MRI->getName(Reg);
7775
dbgs() << "\n";
7876
}
7977

0 commit comments

Comments
 (0)