[Sparc] Constification of TargetMachine arguments

This patch changes the TargetMachine arguments to be const. This is
required for {D19265}, and was requested to be done in a separate patch.

Patch by Jacob Hansen!

Differential Revision: http://reviews.llvm.org/D19797

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268389 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
James Y Knight 2016-05-03 14:57:18 +00:00
parent 1f8afe4ab9
commit 0e6cb51702
4 changed files with 4 additions and 4 deletions

View File

@ -1448,7 +1448,7 @@ static SPCC::CondCodes FPCondCCodeToFCC(ISD::CondCode CC) {
}
}
SparcTargetLowering::SparcTargetLowering(TargetMachine &TM,
SparcTargetLowering::SparcTargetLowering(const TargetMachine &TM,
const SparcSubtarget &STI)
: TargetLowering(TM), Subtarget(&STI) {
MVT PtrVT = MVT::getIntegerVT(8 * TM.getPointerSize());

View File

@ -54,7 +54,7 @@ namespace llvm {
class SparcTargetLowering : public TargetLowering {
const SparcSubtarget *Subtarget;
public:
SparcTargetLowering(TargetMachine &TM, const SparcSubtarget &STI);
SparcTargetLowering(const TargetMachine &TM, const SparcSubtarget &STI);
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override;
/// computeKnownBitsForTargetNode - Determine which of the bits specified

View File

@ -50,7 +50,7 @@ SparcSubtarget &SparcSubtarget::initializeSubtargetDependencies(StringRef CPU,
}
SparcSubtarget::SparcSubtarget(const Triple &TT, const std::string &CPU,
const std::string &FS, TargetMachine &TM,
const std::string &FS, const TargetMachine &TM,
bool is64Bit)
: SparcGenSubtargetInfo(TT, CPU, FS), TargetTriple(TT), Is64Bit(is64Bit),
InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this),

View File

@ -46,7 +46,7 @@ class SparcSubtarget : public SparcGenSubtargetInfo {
public:
SparcSubtarget(const Triple &TT, const std::string &CPU,
const std::string &FS, TargetMachine &TM, bool is64bit);
const std::string &FS, const TargetMachine &TM, bool is64bit);
const SparcInstrInfo *getInstrInfo() const override { return &InstrInfo; }
const TargetFrameLowering *getFrameLowering() const override {