[llvm] 7819172 - Revert rG22c383763456 "[RISCV] Remove include of RISCVRegisterInfo.h from RISCVBaseInfo.h"

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 30 04:59:59 PDT 2020


Author: Simon Pilgrim
Date: 2020-10-30T11:59:37Z
New Revision: 781917254dba17df7fb357a5f621ada2ac1b36e3

URL: https://github.com/llvm/llvm-project/commit/781917254dba17df7fb357a5f621ada2ac1b36e3
DIFF: https://github.com/llvm/llvm-project/commit/781917254dba17df7fb357a5f621ada2ac1b36e3.diff

LOG: 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

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
    llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp b/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
index 8c3f069d471e..9b1899a759f4 100644
--- a/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
+++ b/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
@@ -65,10 +65,10 @@ ABI getTargetABI(StringRef ABIName) {
 // To avoid the BP value clobbered by a function call, we need to choose a
 // callee saved register to save the value. RV32E only has X8 and X9 as callee
 // saved registers and X8 will be used as fp. So we choose X9 as bp.
-MCRegister getBPReg() { return RISCV::X9; }
+Register getBPReg() { return RISCV::X9; }
 
 // Returns the register holding shadow call stack pointer.
-MCRegister getSCSPReg() { return RISCV::X18; }
+Register getSCSPReg() { return RISCV::X18; }
 
 } // namespace RISCVABI
 

diff  --git a/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h b/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h
index 0f30397fd30a..1b498b3c0102 100644
--- a/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h
+++ b/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h
@@ -13,6 +13,7 @@
 #ifndef LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVBASEINFO_H
 #define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVBASEINFO_H
 
+#include "RISCVRegisterInfo.h"
 #include "MCTargetDesc/RISCVMCTargetDesc.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSwitch.h"
@@ -205,10 +206,10 @@ ABI computeTargetABI(const Triple &TT, FeatureBitset FeatureBits,
 ABI getTargetABI(StringRef ABIName);
 
 // Returns the register used to hold the stack pointer after realignment.
-MCRegister getBPReg();
+Register getBPReg();
 
 // Returns the register holding shadow call stack pointer.
-MCRegister getSCSPReg();
+Register getSCSPReg();
 
 } // namespace RISCVABI
 


        


More information about the llvm-commits mailing list