diff --git a/bolt/include/bolt/Core/MCPlusBuilder.h b/bolt/include/bolt/Core/MCPlusBuilder.h index c5376ca1d3fc..e6f4222ce9d3 100644 --- a/bolt/include/bolt/Core/MCPlusBuilder.h +++ b/bolt/include/bolt/Core/MCPlusBuilder.h @@ -424,9 +424,7 @@ public: /// Return a register number that is guaranteed to not match with /// any real register on the underlying architecture. - virtual MCPhysReg getNoRegister() const { - llvm_unreachable("not implemented"); - } + MCPhysReg getNoRegister() const { return MCRegister::NoRegister; } /// Return a register corresponding to a function integer argument \p ArgNo /// if the argument is passed in a register. Or return the result of diff --git a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp index 41c19c113f0c..3b14c16b3365 100644 --- a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp +++ b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp @@ -204,8 +204,6 @@ public: return Inst.getOpcode() == AArch64::BLR; } - MCPhysReg getNoRegister() const override { return AArch64::NoRegister; } - bool hasPCRelOperand(const MCInst &Inst) const override { // ADRP is blacklisted and is an exception. Even though it has a // PC-relative operand, this operand is not a complete symbol reference diff --git a/bolt/lib/Target/X86/X86MCPlusBuilder.cpp b/bolt/lib/Target/X86/X86MCPlusBuilder.cpp index 3a1492047cb2..aca88e561e1e 100644 --- a/bolt/lib/Target/X86/X86MCPlusBuilder.cpp +++ b/bolt/lib/Target/X86/X86MCPlusBuilder.cpp @@ -3202,8 +3202,6 @@ public: MCPhysReg getX86R11() const override { return X86::R11; } - MCPhysReg getNoRegister() const override { return X86::NoRegister; } - MCPhysReg getIntArgRegister(unsigned ArgNo) const override { // FIXME: this should depend on the calling convention. switch (ArgNo) {