Skip to content

Commit ed9cc64

Browse files
committed
[llvm-exegesis][mips] Fix -Wunused-function after D72858
1 parent f78f15a commit ed9cc64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/tools/llvm-exegesis/lib/Mips/Target.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
namespace llvm {
1515
namespace exegesis {
1616

17+
#ifndef NDEBUG
1718
// Returns an error if we cannot handle the memory references in this
1819
// instruction.
1920
static Error isInvalidMemoryInstr(const Instruction &Instr) {
2021
switch (Instr.Description.TSFlags & MipsII::FormMask) {
2122
default:
22-
return Error::success();
2323
llvm_unreachable("Unknown FormMask value");
2424
// These have no memory access.
2525
case MipsII::Pseudo:
@@ -36,6 +36,7 @@ static Error isInvalidMemoryInstr(const Instruction &Instr) {
3636
return make_error<Failure>("unsupported opcode: non uniform memory access");
3737
}
3838
}
39+
#endif
3940

4041
// Helper to fill a memory operand with a value.
4142
static void setMemOp(InstructionTemplate &IT, int OpIdx,

0 commit comments

Comments
 (0)