Skip to content

Commit 78fb6bf

Browse files
RKSimonmemfrob
authored andcommitted
Revert rG22c383763456 "[RISCV] Remove include of RISCVRegisterInfo.h from RISCVBaseInfo.h"
This reverts commit 22c38376345670c1883963e5e1cccd597a15b3a5. This is causing a build failure with MSVC - reported on D90322
1 parent 444ee46 commit 78fb6bf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ ABI getTargetABI(StringRef ABIName) {
6565
// To avoid the BP value clobbered by a function call, we need to choose a
6666
// callee saved register to save the value. RV32E only has X8 and X9 as callee
6767
// saved registers and X8 will be used as fp. So we choose X9 as bp.
68-
MCRegister getBPReg() { return RISCV::X9; }
68+
Register getBPReg() { return RISCV::X9; }
6969

7070
// Returns the register holding shadow call stack pointer.
71-
MCRegister getSCSPReg() { return RISCV::X18; }
71+
Register getSCSPReg() { return RISCV::X18; }
7272

7373
} // namespace RISCVABI
7474

llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVBASEINFO_H
1414
#define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVBASEINFO_H
1515

16+
#include "RISCVRegisterInfo.h"
1617
#include "MCTargetDesc/RISCVMCTargetDesc.h"
1718
#include "llvm/ADT/StringRef.h"
1819
#include "llvm/ADT/StringSwitch.h"
@@ -205,10 +206,10 @@ ABI computeTargetABI(const Triple &TT, FeatureBitset FeatureBits,
205206
ABI getTargetABI(StringRef ABIName);
206207

207208
// Returns the register used to hold the stack pointer after realignment.
208-
MCRegister getBPReg();
209+
Register getBPReg();
209210

210211
// Returns the register holding shadow call stack pointer.
211-
MCRegister getSCSPReg();
212+
Register getSCSPReg();
212213

213214
} // namespace RISCVABI
214215

0 commit comments

Comments
 (0)