Skip to content

Commit 0042b35

Browse files
committed
Address review comments
1 parent 2fb1519 commit 0042b35

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,11 @@ void RISCVAsmPrinter::emitInstruction(const MachineInstr *MI) {
332332
const Function &F = MI->getParent()->getParent()->getFunction();
333333
if (F.hasFnAttribute("patchable-function-entry")) {
334334
unsigned Num;
335-
assert(!F.getFnAttribute("patchable-function-entry")
336-
.getValueAsString()
337-
.getAsInteger(10, Num) &&
338-
"Enforced by the verified");
335+
[[maybe_unused]] bool Result =
336+
F.getFnAttribute("patchable-function-entry")
337+
.getValueAsString()
338+
.getAsInteger(10, Num);
339+
assert(!Result && "Enforced by the verifier");
339340
emitNops(Num);
340341
return;
341342
}

0 commit comments

Comments
 (0)