Commit ed9cc640 authored by Fangrui Song's avatar Fangrui Song
Browse files

[llvm-exegesis][mips] Fix -Wunused-function after D72858

parent f78f15a6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -14,12 +14,12 @@
namespace llvm {
namespace exegesis {

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

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