diff --git a/bolt/include/bolt/Core/MCPlusBuilder.h b/bolt/include/bolt/Core/MCPlusBuilder.h --- a/bolt/include/bolt/Core/MCPlusBuilder.h +++ b/bolt/include/bolt/Core/MCPlusBuilder.h @@ -424,8 +424,8 @@ /// 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 diff --git a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp --- a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp +++ b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp @@ -204,8 +204,6 @@ 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 --- a/bolt/lib/Target/X86/X86MCPlusBuilder.cpp +++ b/bolt/lib/Target/X86/X86MCPlusBuilder.cpp @@ -3202,8 +3202,6 @@ 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) {