[BOLT][NFC] Return MCRegister::NoRegister from MCPlusBuilder::getNoRegister()

Reviewed By: yota9

Differential Revision: https://reviews.llvm.org/D120863
This commit is contained in:
Maksim Panchenko 2022-03-02 18:30:40 -08:00
parent 4212a57a54
commit fada230920
3 changed files with 1 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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) {